I'm completely confused. I have a Django environment installed in /var/
www/sites/project, which is accessed using mod_python/Apache. I want
to access the Django environment from a script - actually a Mercurial
hook. So I added this to my hook:
sys.path.append("/var/www/sites")
os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings'
from project import settings
from django.core.management import setup_environ
setup_environ(settings)
But I get an exception:
cannot import name settings
I've triple checked everything and read numerous pages found through
Google that all seem to say I'm doing this right. Any ideas?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
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.