Commits

Carl Meyer committed 2338466

Support Django 1.7 in test runner.

Comments (0)

Files changed (1)

 from os.path import dirname, abspath
 import sys
 
+import django
 from django.conf import settings
 
+
 if not settings.configured:
-    from django import VERSION
     settings_dict = dict(
         INSTALLED_APPS=(
             'localeurl',
         ROOT_URLCONF='localeurl.tests.test_urls',
         SITE_ID=1,
         )
-    if VERSION >= (1, 2):
+    if django.VERSION >= (1, 2):
         settings_dict["DATABASES"] = {
             "default": {
                 "ENGINE": "django.db.backends.sqlite3"
     settings.configure(**settings_dict)
 
 
+if django.VERSION >= (1, 7):
+    django.setup()
+
+
 def runtests(*test_args):
     if not test_args:
         test_args = ['tests']