I want to use a different settings file in django - specifically settings_prod- - whenever I have a syncdb To I also try to set the environment variable Edit: I have also set environment variables in my wsgi file, even to the end: Suggestions? I know what you do with Note that this option is unnecessary in manage.py, because it uses settings.py by default from the current project. You should try - settings = settings_prod , it complains:
python2.6 manage.py syncdb --settings = settings_prod Error: File 'settings.py' can not be found It seems that you have customized things in a directory with 'Manage.py'. To run django-admin.py, it must pass its settings module (if the file's Etats is actually present, so it is by no means generating import error.)
DJANGO_SETTINGS_MODULE = settings_prod Is the end of
import os import sys from django.core .handlers.wsgi Import WSGIHandler os.environ ['DJANGO_SETTINGS_MODULE'] = 'project.settings_prod' application = WSGIHandler ()
manage.py , You are taking that error because a relative imports of
manage.py
settings :
Try: Import Settings # Assumed to be in the same directory.
django-admin.py syncdb --settings = mysettings instead
Comments
Post a Comment