ImportError: Could not import settings

前端 未结 6 992
一生所求
一生所求 2020-12-03 01:11

I am trying to develop an sample project in Django and getting errors when I run the syncdb command.

This is how my project structure looks like:

/Users/djan

6条回答
  •  一向
    一向 (楼主)
    2020-12-03 01:17

    Alternatively, you can even pass the settings path at run time like so:

    python manage.py syncdb --settings=bookings.settings --pythonpath=/Users/django_demo/godjango/bookings
    

    This should override the environment variable (DJANGO_SETTINGS_MODULE)

提交回复
热议问题