typeidea icon indicating copy to clipboard operation
typeidea copied to clipboard

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

Open liuchangfu opened this issue 4 years ago • 0 comments

老师,您好,我在分离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

liuchangfu avatar May 29 '20 01:05 liuchangfu