On Sun, 2007-10-14 at 11:52 +0000, faypy wrote: > it's a simple test script: > > from django.core.management import setup_environ > import settings > settings.DATABASE_NAME = '/home/me/mysite/libtest.sdb' > print settings.DATABASE_NAME > setup_environ(settings) > > from ist.models import * > from ist.tests import users > .... > > the problem is it will change the default database > '/home/me/mysite/lib.sdb' > not > '/home/me/mysite/libtest.sdb' > > django mysteriously ignore > settings.DATABASE_NAME = '/home/me/mysite/libtest.sdb' > and do whatever it want?
Because of some internal implementation details, there is some code that effectively reloads the settings module as part of setting up the environment. So changes you made to your initial copy do not get preserved. If you want to do manual configuration, use settings.configure(). Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---