1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #1321 -- Made DJANGO_SETTINGS_MODULE optional. You can now call django.conf.settings.configure() to set settings manually if you don't have a settings module. Thanks, Malcolm Tredinnick, Luke Plant, Fredrik Lundh

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty
2006-05-16 21:28:06 +00:00
parent 27612d8b7d
commit c643e12faf
8 changed files with 213 additions and 20 deletions

View File

@@ -73,6 +73,10 @@ class TestRunner:
def run_tests(self):
from django.conf import settings
# An empty access of the settings to force the default options to be
# installed prior to assigning to them.
settings.INSTALLED_APPS
# Manually set INSTALLED_APPS to point to the test models.
settings.INSTALLED_APPS = [MODEL_TESTS_DIR_NAME + '.' + a for a in get_test_models()]