Skip to content

Django 2.2 support #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
- DJANGO_VERSION=1.9.x
- DJANGO_VERSION=1.10.x
- DJANGO_VERSION=1.11.x
- DJANGO_VERSION=2.2.x
install:
- pip install tox
script:
Expand All @@ -19,5 +20,15 @@ matrix:
exclude:
- python: "2.7"
env: DJANGO_VERSION=master
- python: "2.7"
env: DJANGO_VERSION=2.2.x
- python: "3.4"
env: DJANGO_VERSION=master
- python: "3.4"
env: DJANGO_VERSION=2.2.x
- python: "3.5"
env: DJANGO_VERSION=master
- python: "pypy"
env: DJANGO_VERSION=2.2.x
- python: "pypy"
env: DJANGO_VERSION=master
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def read(*parts):


install_requires = [
'django>=1.8,<2.0',
'django>=1.8,<=2.2',
'babel>=1.3',
'django-babel>=0.5.1',
'markey>=0.8,<0.9',
Expand Down Expand Up @@ -83,5 +83,8 @@ def read(*parts):
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
)
9 changes: 6 additions & 3 deletions src/django_babel_underscore/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# -*- coding: utf-8 -*-
import django

if django.VERSION[:2] >= (1, 8):
from django.template.base import Lexer, TOKEN_TEXT
from django.template.base import Lexer
try:
from django.template.base import TokenType
except ImportError: # django < 2.1
from django.template.base import TOKEN_TEXT
else:
from django.template import Lexer, TOKEN_TEXT
TOKEN_TEXT = TokenType.TEXT

from django.utils.encoding import force_text
from django_babel.extract import extract_django
Expand Down
6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ deps110 =
https://github.com/django/django/archive/stable/1.10.x.tar.gz#egg=django
deps111 =
https://github.com/django/django/archive/stable/1.11.x.tar.gz#egg=django
deps22 =
https://github.com/django/django/archive/stable/2.2.x.tar.gz#egg=django
master =
https://github.com/django/django/archive/master.tar.gz#egg=django

Expand Down Expand Up @@ -69,6 +71,10 @@ deps = {[testenv]deps110}
basepython = python3.5
deps = {[testenv]deps111}

[testenv:3.5-2.2.x]
basepython = python3.5
deps = {[testenv]deps22}

[testenv:3.5-master]
basepython = python3.5
deps = {[testenv]master}
Expand Down