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