1👍
✅
1) Move settings.py to C:\wamp\www\
.
2) export DJANGO_SETTINGS_MODULE = 'settings'
If you’re on Windows, you can type
set DJANGO_SETTINGS_MODULE = 'settings'
but it will only work until you close the window.
To make it permanent,
a) Start->Settings->Control Panel->System or press Win
–Pause
b) Advanced system settings->Environment Variables->New user variable:
c) (name) DJANGO_SETTINGS_MODULE,
(value) settings
then open new terminal window – existing windows are not be affected.
3) Don’t debug views.py by running it. It normally doesn’t work. Debug through
python manage.py runserver 8000
when you’re inside C:\wamp\www\
.
Source:stackexchange.com