Secret_Key设置必须也不是空错误吗?

时间:2017-02-25 05:35:20

标签: python django python-2.7 secret-key

在终端中运行我的项目后,运行命令:

python manage.py build -ad

我收到以下错误消息。任何人都可以帮助我

(project1) srk@srk-Lenovo-G580:~/easygaadi_backend$ python manage.py runserver

Traceback (most recent call last):
  File "manage.py", line 8, in <module>
    execute_from_command_line(sys.argv)
  File "/home/srk/Envs/project1/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/home/srk/Envs/project1/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/srk/Envs/project1/local/lib/python2.7/site-packages/django/core/management/base.py", line 306, in run_from_argv
    connections.close_all()
  File "/home/srk/Envs/project1/local/lib/python2.7/site-packages/django/db/utils.py", line 229, in close_all
    for alias in self:
  File "/home/srk/Envs/project1/local/lib/python2.7/site-packages/django/db/utils.py", line 223, in __iter__
    return iter(self.databases)
  File "/home/srk/Envs/project1/local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/srk/Envs/project1/local/lib/python2.7/site-packages/django/db/utils.py", line 156, in databases
    self._databases = settings.DATABASES
  File "/home/srk/Envs/project1/local/lib/python2.7/site-packages/django/conf/__init__.py", line 53, in __getattr__
    self._setup(name)
  File "/home/srk/Envs/project1/local/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/srk/Envs/project1/local/lib/python2.7/site-packages/django/conf/__init__.py", line 116, in __init__



    raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.

0 个答案:

没有答案