django-timepiece icon indicating copy to clipboard operation
django-timepiece copied to clipboard

No module name example_project

Open CleverProgrammer opened this issue 8 years ago • 2 comments

I followed the instructions in terms of pip install django-timepiece and then installing less. However I get the following error when I do python manage.py runserver in the example_project directory.

ImportError: No module named 'example_project'

CleverProgrammer avatar Jun 12 '16 23:06 CleverProgrammer

You will need to change a few lines to make this work in that directory,

in wsgi.py

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings.local")

in settings/base.py

ROOT_URLCONF = 'urls'
...
WSGI_APPLICATION = 'wsgi.application'

Although I believe the better way to fix this problem is to use startproject with a template folder, https://docs.djangoproject.com/en/1.9/ref/django-admin/#startproject

chid avatar Jun 14 '16 05:06 chid

Also in manage.py os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings.local")

smaystr avatar Feb 15 '17 17:02 smaystr