程序员WEB前端程序开发大数据 爬虫Python AI Sql

manager.py shell 报错

2017-02-09  本文已影响1239人  理工大叔

运行manager.py shell 时报错,查网上有关帖子,在setting.py 中添加

from   django.core.wsgi    import   get_ws gi_application

application = get_wsgi_application()

仍然报错:

raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")

django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.

估计这个错误和SECRET_KEY有关,然后把application = get_wsgi_application()移到SECRET_KEY的赋值之后。

from   django.core.wsgi  import    get_wsgi_application

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

SECRET_KEY ='bk=5-o+^bfdga*y$s4xt48%ju&v678(he!v930^oq3siq+f+35'

application = get_wsgi_application()

Work!!!

上一篇 下一篇

猜你喜欢

热点阅读