Django 1.5b1: executing django-admin.py causes “No module named settings” error

后端 未结 5 1491
离开以前
离开以前 2021-02-07 08:25

I\'ve recently installed Django-1.5b1. My system configuration:

  • OSX 10.8
  • Python 2.7.1
  • Virtualenv 1.7.2

When I call django-

5条回答
  •  情话喂你
    2021-02-07 08:56

    I had the same issue when starting a new project. I solved the problem by giving this command at the command prompt:

    export DJANGO_SETTINGS_MODULE=
    

    in this way I unset the variable that was pointing to a "settings" file (discovered using env | grep DJANGO_SETTINGS_MODULE) I set before starting using virtualenv

    after unsetting the variable the django-admin.py script worked like a charm!

提交回复
热议问题