Cannot Import Settings In Django
I need to test my Django app with py.test. Hence, I need to tell py.test which is Django's settings module. The command I use for py.test is: ~/GitHub/django-training$ py.test --ds
Solution 1:
The training directory is probably really not on sys.path. A usual approach is to run in a virtualenv and run pip install -e .
in the django-training
directory, assuming it has a setup.py
. But any other means which fits with your development workflow is fine.
Post a Comment for "Cannot Import Settings In Django"