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=training.settings Unfortunately, I get this error: ERROR: Could not import settings 'training.settings' (Is it on sys.path?): No module named training.settings Is looks very odd, because my folder structure looks like this: django-training training settings.py and my sys.path contains the /home/user/GitHub/django