diff options
author | Rob Austein <sra@hactrn.net> | 2014-10-05 01:15:55 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2014-10-05 01:15:55 +0000 |
commit | d4f19b6a2957b11d286b1306cc1b209ee18e200c (patch) | |
tree | 7ec4338c4c19034e1669b1c1ffaddb647f867263 /ca/tests | |
parent | 24635430e46c2fad0bdb5fb12fe18e212f76c437 (diff) |
Address incompatible API changes in Django 1.7: apps.populate(),
MIDDLEWARE_CLASSES. Fixes #717.
svn path=/trunk/; revision=5986
Diffstat (limited to 'ca/tests')
-rw-r--r-- | ca/tests/yamlconf.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ca/tests/yamlconf.py b/ca/tests/yamlconf.py index 1b339a89..f1073c92 100644 --- a/ca/tests/yamlconf.py +++ b/ca/tests/yamlconf.py @@ -773,13 +773,20 @@ def body(): databases["default"] = databases[db.root.irdb_name] + import django + from django.conf import settings settings.configure( DATABASES = databases, DATABASE_ROUTERS = ["rpki.irdb.router.DBContextRouter"], + MIDDLEWARE_CLASSES = (), INSTALLED_APPS = ("rpki.irdb",)) + if django.VERSION >= (1, 7): # API change, feh + from django.apps import apps + apps.populate(settings.INSTALLED_APPS) + import rpki.irdb rpki.irdb.models.ca_certificate_lifetime = rpki.sundial.timedelta(days = 3652 * 2) |