Merge pull request #52 from jayvdb/dj31

Django 3.1 support
This commit is contained in:
Daniel Indictor 2020-07-16 17:52:02 -04:00 committed by GitHub
commit a9c54f6ce3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -22,6 +22,7 @@ Q-expressions need to be rewritten for two reasons:
from itertools import count
from functools import wraps
from django.core.exceptions import FieldDoesNotExist
from django.core.exceptions import FieldError, ObjectDoesNotExist
from django.db import models
from django.db.models import Case, IntegerField, Q, When
@ -248,7 +249,7 @@ def expand_eav_filter(model_cls, key, value):
try:
field = model_cls._meta.get_field(fields[0])
except models.FieldDoesNotExist:
except FieldDoesNotExist:
return key, value
if not field.auto_created or field.concrete:

View file

@ -3,7 +3,8 @@ envlist =
py27-django{111},
py35-django{111,20,30,tip},
py36-django{111,20,30,tip},
py37-django{111,20,30,tip},
py37-django{111,20,21,22,30,tip},
py38-django{111,20,21,22,30,tip}
migrationscheck
[testenv]
@ -12,8 +13,10 @@ pip_pre=True
deps =
django111: Django >=1.11, <2.0
django20: Django >= 2.0, <2.1
django21: Django >= 2.3, <2.2
django22: Django >= 2.2, <2.3
django30: Django >= 3.0, <3.1
djangotip: Django
djangotip: https://github.com/django/django/archive/master.tar.gz
commands =
./runtests