django1.4 问题记录

1 ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined. 

 

$ which python2.7
/usr/bin/python2.7
$   export PYTHONPATH=/usr/bin/python2.7:~/(projectname)
$   export DJANGO_SETTINGS_MODULE=(appname).settings

 

 

把上面2行加到 ~/.profile文件中就可以永久的解决这个问题了

你可能感兴趣的:(django)