Code quality
This commit is contained in:
parent
4129687e41
commit
9cd44aa8aa
3 changed files with 12 additions and 2 deletions
|
@ -21,6 +21,8 @@ matrix:
|
|||
env: TOX_ENV=py36-django21
|
||||
- python: "3.7"
|
||||
env: TOX_ENV=py37-django22
|
||||
- python: "3.8"
|
||||
env: TOX_ENV=py38-django22
|
||||
- python: "3.8"
|
||||
env: TOX_ENV=py38-django30
|
||||
- python: "3.8"
|
||||
|
|
|
@ -20,7 +20,11 @@ try:
|
|||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
except ImportError:
|
||||
def python_2_unicode_compatible(f): return f
|
||||
def python_2_unicode_compatible(func):
|
||||
"""
|
||||
We use Django >= 3.0 with Python >= 3.4, we don't need Python 2 compatibility.
|
||||
"""
|
||||
return func
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.core.mail import send_mail
|
||||
|
||||
|
|
|
@ -24,7 +24,11 @@ try:
|
|||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from django.utils.translation import ugettext as _
|
||||
except ImportError:
|
||||
def python_2_unicode_compatible(f): return f
|
||||
def python_2_unicode_compatible(func):
|
||||
"""
|
||||
We use Django >= 3.0 with Python >= 3.4, we don't need Python 2 compatibility.
|
||||
"""
|
||||
return func
|
||||
from django.utils.translation import gettext as _
|
||||
from django.utils.safestring import mark_safe
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue