Wednesday, March 4, 2015

Re: Can't run django!

Is there a possibility of having more than one settings file? If so, ensure that your manage.py is pointing at the right settings file. The output of 'manage.py runserver' should also show the dotted path of the settings file that it is using just before that error is displayed (I believe). 

You can also verify that your DEBUG value is being correctly parsed by running 'manage.py diffsettings'. One of the lines of output should be 'DEBUG = True' since DEBUG defaults to False. If it isn't there, then your DEBUG setting is somehow set to True (or may be missing from your settings.py file). If you are on a Linux host shell, you can run 'python manage.py diffsettings | grep DEBUG' to filter the lines containing DEBUG or on Windows 'manage.py diffsettings | find "DEBUG" '.

-James

On Mon, Mar 2, 2015 at 7:44 AM, David Zahedi <davidza001@gmail.com> wrote:
Hi there,

I am using python 2.7 and django 1.75; when I run "manage.py runserver" I get the following error:

CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False.
An exception has occurred, use %tb to see the full traceback.


My DEBUG is True.

Thanks

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ea41d3e8-4d93-4076-8df8-a099360d13aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Be%2BciXjYa_4bdETK4PYFRKvhbo9zXoq9%3D3uzP%3DkcRxpX0Acvw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment