diff --git a/.travis.yml b/.travis.yml index a5987de..84c194e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,6 +49,8 @@ matrix: python: 3.5 - env: TOXENV=py36-dj20 python: 3.6 + - env: TOXENV=py36-dj21 + python: 3.6 - env: TOXENV=py36-djmaster python: 3.6 allow_failures: diff --git a/configurations/importer.py b/configurations/importer.py index 06b64fb..f9dfd6c 100644 --- a/configurations/importer.py +++ b/configurations/importer.py @@ -82,9 +82,16 @@ def name(self): return os.environ.get(self.namevar) def check_options(self): - parser = base.CommandParser(None, - usage="%(prog)s subcommand [options] [args]", - add_help=False) + try: + parser = base.CommandParser( + usage="%(prog)s subcommand [options] [args]", + add_help=False) + except TypeError: + # Django before 2.1 used a `cmd` argument. + parser = base.CommandParser( + None, + usage="%(prog)s subcommand [options] [args]", + add_help=False) parser.add_argument('--settings') parser.add_argument('--pythonpath') parser.add_argument(CONFIGURATION_ARGUMENT, diff --git a/tox.ini b/tox.ini index a367e6d..f48514a 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,8 @@ envlist = flake8-py36, readme-py27, py{27,34,35,36,py}-dj{18,110,111} - py{34,35,36}-dj{20,master} + py{34,35,36,37}-dj20 + py{35,36,37}-dj{21,master} [testenv] usedevelop = true @@ -21,6 +22,7 @@ deps = dj110: django>=1.10,<1.11 dj111: django>=1.11,<2.0 dj20: django>=2.0a1,<2.1 + dj21: django>=2.1a1,<2.2 djmaster: https://github.com/django/django/archive/master.tar.gz#egg=django commands =