亿万教师在线注册平台用pycharm启动django报错。

我用pycharm2016.1启动django项目会报错,如下:

Traceback most recent call last:
File “C:/Users/wenqiang/Desktop/pyjh_xueqi_0803/manage.py”, line 27, in <module>

execute_from_command_linesys.argv

File “C:Python27libsite-packagesdjangocoremanagement__init__.py”, line 399, in execute_from_command_line

utility.execute

File “C:Python27libsite-packagesdjangocoremanagement__init__.py”, line 392, in execute

self.fetch_commandsubcommand.run_from_argvself.argv

File “C:Python27libsite-packagesdjangocoremanagementbase.py”, line 242, in run_from_argv

self.execute*args, **options.__dict__

File “C:Python27libsite-packagesdjangocoremanagementbase.py”, line 279, in execute

saved_locale = translation.get_language

File “C:Python27libsite-packagesdjangoutilstranslation__init__.py”, line 154, in get_language

return _trans.get_language

File “C:Python27libsite-packagesdjangoutilstranslation__init__.py”, line 52, in getattr

if settings.USE_I18N:

File “C:Python27libsite-packagesdjangoconf__init__.py”, line 54, in getattr

self._setupname

File “C:Python27libsite-packagesdjangoconf__init__.py”, line 47, in _setup

% desc, ENVIRONMENT_VARIABLE

django.core.exceptions.ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure before accessing settings.
Process finished with exit code 1

但是在该文件下用下令行启动就没题目:

求解

新建一个假造情况在设置中选择运用你的假造情况

(看完/读完)这篇文章有何感想! 亿万先生在线注册平台的分享…

发表评论

姓名 *
电子邮件 *
站点