DJANGO_SETTINGS_MODULE is undefined 解决方法
2011-10-10 19:51
429 查看
安装了Django ,在访问http://localhost:7464/django.db.html 的时候提示
problem in django.db - <type 'exceptions.ImportError'>: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE isundefined.
查到了/article/4867906.html 这个文章,用上面的方法解决问题
文件目录
E:-
\pythontest-
\mysite-
\__init__.py
\manage.py
\settings.py
\urls.py
在系统的环境变量里面添加新的环境变量
PYTHONPATH:D:\python27;E:\pythontest
D:\python27是Python 安装目录
E:\pythontest
就是我的网站的父目录
添加DJANGO_SETTINGS_MODULE:'mysite.settings'
mysite 就是 我的网站的文件夹名 这个环境变量的内容就是字符串'mysite.settings',而不是传统的'\'分割的路径
保存
重启Python Doc 就可以了
相关文章推荐
- DJANGO_SETTINGS_MODULE is undefined 解决方法
- DJANGO_SETTINGS_MODULE is undefined.
- DJANGO_SETTINGS_MODULE is undefined
- ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
- Django开发中DJANGO_SETTINGS_MODULE is undefined解决方案
- Django开发中DJANGO_SETTINGS_MODULE is undefined解决方案
- Django开发中DJANGO_SETTINGS_MODULE is undefined解决方案
- window下Django第三方APP调用PIL生成验证码出现ImportError: The _imagingft C module is not installed解决
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的解决方法
- Firebug报错: TypeError: parent.XXX is undefined 解决方法
- ISE10.1中复数乘法器IP核使用ModelSim仿真时出现“Module 'CMPY_V2_1' is not defined.”错误的解决方法
- jsp The method getServletContext() is undefined for the type in eclipse解决方法
- $.fn.zTree is undefined 错误解决方法
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的解决方法
- 在虚拟机Centos7上安装Oracle重启机器,用root登录报Module is Unknown的解决方法
- uploadify动态更新配置参数方法uploadifySettings()报错“updateSettings is not a function”之解决办法
- 在使用jQuery2.1.0和bootstrap2.3.2出现“TypeError: $.browser is undefined”错误的解决方法
- ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is und
- 报错 No module named 'email.utils'; 'email' is not a package解决方法
- jsp The method getServletContext() is undefined for the type in eclipse解决方法