Skip to content

Commit 642971e

Browse files
committed
Add support for Python 3.9 and Django 3.1
1 parent 83d4c1f commit 642971e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

django_pgviews/view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def hasfield(model_cls, field_name):
3333
try:
3434
model_cls._meta.get_field(field_name)
3535
return True
36-
except models.FieldDoesNotExist:
36+
except exceptions.FieldDoesNotExist:
3737
return False
3838

3939

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@
2626
"Development Status :: 5 - Production/Stable",
2727
"Programming Language :: Python",
2828
"Programming Language :: Python :: 3",
29+
"Programming Language :: Python :: 3.6",
30+
"Programming Language :: Python :: 3.7",
31+
"Programming Language :: Python :: 3.8",
32+
"Programming Language :: Python :: 3.9",
2933
"Framework :: Django",
30-
"Framework :: Django :: 2.0",
34+
"Framework :: Django :: 2.2",
3135
"Framework :: Django :: 3.0",
36+
"Framework :: Django :: 3.1",
3237
],
3338
)

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{36,37,38}-dj{22,30}
2+
envlist = py{36,37,38,39}-dj{22,30,31}
33

44
[testenv]
55
usedevelop = true
@@ -10,6 +10,7 @@ deps=
1010
-rtests/requirements.txt
1111
dj22: https://github.com/django/django/archive/stable/2.2.x.tar.gz#egg=django
1212
dj30: https://github.com/django/django/archive/stable/3.0.x.tar.gz#egg=django
13+
dj31: https://github.com/django/django/archive/stable/3.1.x.tar.gz#egg=django
1314
commands=
1415
python manage.py test {posargs:test_project.viewtest}
1516
passenv = DB_NAME DB_USER DB_PASSWORD

0 commit comments

Comments
 (0)