Skip to content

Commit

Permalink
Merge pull request #25 from just-work/pyup-update-django-3.1.7-to-3.2
Browse files Browse the repository at this point in the history
Update django to 3.2
  • Loading branch information
tumb1er authored Apr 9, 2021
2 parents b007e48 + 5d1d601 commit dcb1bb5
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
django-version: [2.2, 3.0, 3.1]
django-version: [2.2, 3.0, 3.1, 3.2]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Django==3.1.7
Django==3.2
dj-inmemorystorage==2.1.0
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,15 @@ def get_version():
author_email='[email protected]',
description='Background sitemap generation for Django',
install_requires=[
'Django>=2.2,<3.2',
'Django>=2.2,<3.3',
],
classifiers=[
'Development Status :: 1 - Planning',
'Development Status :: 4 - Beta',
'Environment :: Console',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Framework :: Django :: 3.2',
'Operating System :: POSIX',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
Expand Down
2 changes: 0 additions & 2 deletions sitemap_generate/management/commands/generate_sitemap.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from django.conf import settings
from django.core.management import BaseCommand
from django.utils.module_loading import import_string

from sitemap_generate.generator import SitemapGenerator

Expand Down
2 changes: 1 addition & 1 deletion testproject/testapp/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class TestappConfig(AppConfig):
name = 'testapp'
name = 'testproject.testapp'
13 changes: 11 additions & 2 deletions testproject/testapp/tests.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
from typing import cast

import django
from django.core.files.storage import default_storage, Storage
from django.core.management import call_command
from django.test import TestCase
Expand All @@ -10,8 +11,16 @@


class GenerateSitemapCommandTestCase(TestCase):
header = ['<?xml version="1.0" encoding="UTF-8"?>',
'<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">']
if django.VERSION >= (3, 2):
header = [
'<?xml version="1.0" encoding="UTF-8"?>',
'<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" '
'xmlns:xhtml="http://www.w3.org/1999/xhtml">']
else:
header = [
'<?xml version="1.0" encoding="UTF-8"?>',
'<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">']

footer = ['</urlset>']

empty = header + [''] + footer
Expand Down

0 comments on commit dcb1bb5

Please sign in to comment.