Re: DJANGOֹ_SETTINGS_MODULE different from folder name
It's all about sys.path and the semantics of import.
DJANGO_SETTINGS_MODULE must be a name that can be imported. Any dots in the string divide the name into a number of names. The first name must be findable via sys.path. If it is the last name, it can name a .py file. Otherwise it must be the name of a package, that is, a directory (folder) containing an __init__.py file, as well as the next name in the chain as a package, or if it is the last name, it can be a .py file.On Wed, Jul 10, 2013 at 2:39 AM, Etay Cohen-Solal <et.std8@gmail.com> wrote:
It's kinda noob question,
but I have a working dev project inside directory
/var/www/django/myproject
os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'I want to change the folder of the project to something like:/var/www/websites/il_co_project_name_wwwbut i get 500 Internal Server Error.If I change the DJANGO_SETTINGS_MODULE to:os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'(remove the myproject.)Then WSGI works, but I get Django errors of missing URL conf, and then VIEW, etc...can I use DJANGO_SETTINGS_MODULE different from folder name?--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home