设置 pythonpath
1.在.bashrc 文件中,
PYTHONPATH="${PYTHONPATH}:/home/zhang/Document/mysite:/home/zhang/Document/icecream/icecream_project/icecream_project"
export PYTHONPATH
2.在命令中
django-admin.py shell --pythonpath='pwd' --settings=mysite.settings.local
默认path 都是project 文件。