Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module name example_project #869

Open
CleverProgrammer opened this issue Jun 12, 2016 · 2 comments
Open

No module name example_project #869

CleverProgrammer opened this issue Jun 12, 2016 · 2 comments

Comments

@CleverProgrammer
Copy link

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
Copy link

chid commented Jun 14, 2016

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
Copy link

smaystr commented Feb 15, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants