caktus / django-timepiece

A multi-user Django application for tracking people's time on projects.
MIT License
361 stars 112 forks source link

No module name example_project #869

Open CleverProgrammer opened 8 years ago

CleverProgrammer commented 8 years ago

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'
chid commented 8 years ago

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

smaystr commented 7 years ago

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