django.core.exceptions.ImproperlyConfigured:

1,210 views
Skip to first unread message

harsh sharma

unread,
Oct 2, 2017, 1:50:52 AM10/2/17
to Django users
i am getting this error whenever i m trying to run django-admin runserver

django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configured. You must eit
her define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

my wsgi file

import os
from django.conf import settings
from django.core.wsgi import get_wsgi_application

settings.configure(DEBUG=True)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "website.settings")

application = get_wsgi_application()

ADEWALE ADISA

unread,
Oct 2, 2017, 6:19:44 PM10/2/17
to django...@googlegroups.com

are u sure u are running the command from the root of your project where the folder "website" and file manage.py is ?
try to cd to your project root, then run
python manage.py runserver

--
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...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/568cdb67-2a6f-4e3b-9ba8-842d0c721e7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages