Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
liuchangfu opened this issue May 29, 2020 · 0 comments

Comments

@liuchangfu
Copy link

老师,您好,我在分离settings.py文件时,启动提示这个错了,麻烦帮我看看。
Traceback (most recent call last):
File "E:/MyDjanoProject/typeidea/manage.py", line 23, in
main()
File "E:/MyDjanoProject/typeidea/manage.py", line 19, in main
execute_from_command_line(sys.argv)
File "D:\Python38-32\lib\site-packages\django\core\management_init_.py", line 401, in execute_from_command_line
utility.execute()
File "D:\Python38-32\lib\site-packages\django\core\management_init_.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "D:\Python38-32\lib\site-packages\django\core\management\base.py", line 328, in run_from_argv
self.execute(*args, **cmd_options)
File "D:\Python38-32\lib\site-packages\django\core\management\commands\runserver.py", line 60, in execute
super().execute(*args, **options)
File "D:\Python38-32\lib\site-packages\django\core\management\base.py", line 369, in execute
output = self.handle(*args, **options)
File "D:\Python38-32\lib\site-packages\django\core\management\commands\runserver.py", line 67, in handle
if not settings.DEBUG and not settings.ALLOWED_HOSTS:
File "D:\Python38-32\lib\site-packages\django\conf_init_.py", line 76, in getattr
self.setup(name)
File "D:\Python38-32\lib\site-packages\django\conf_init
.py", line 63, in _setup
self.wrapped = Settings(settings_module)
File "D:\Python38-32\lib\site-packages\django\conf_init
.py", line 161, in init
raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.

项目已上传到github ,环境是py3.8+django3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant