Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/360.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 尝试在ec2上部署django时出错_Python_Django_Ubuntu_Amazon Ec2 - Fatal编程技术网

Python 尝试在ec2上部署django时出错

Python 尝试在ec2上部署django时出错,python,django,ubuntu,amazon-ec2,Python,Django,Ubuntu,Amazon Ec2,我正在尝试部署django,它现在在ec2 ubuntu服务器上本地运行。我在尝试运行python mange.py runserver时遇到了这个问题 我没有找到任何解决办法 Traceback (most recent call last): File "manage.py", line 14, in <module> execute_manager(settings) File "/usr/local/lib/python2.7/dist-packages/django/c

我正在尝试部署django,它现在在ec2 ubuntu服务器上本地运行。我在尝试运行python mange.py runserver时遇到了这个问题 我没有找到任何解决办法

Traceback (most recent call last):
File "manage.py", line 14, in <module>
  execute_manager(settings)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 459, in execute_manager
  utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 382, in execute
  self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 261, in fetch_command
  klass = load_command_class(app_name, subcommand)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 69, in load_command_class
  module = import_module('%s.management.commands.%s' % (app_name, name))
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
  __import__(name)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/management/commands/runserver.py", line 4, in <module>
  from django.core.management.commands.runserver import BaseRunserverCommand
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 8, in <module>
  from django.core.servers.basehttp import AdminMediaHandler, run, WSGIServerException, get_internal_wsgi_application
File "/usr/local/lib/python2.7/dist-packages/django/core/servers/basehttp.py", line 28, in <module>
  from django.contrib.staticfiles import handlers
File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/handlers.py", line 8, in <module>
  from django.contrib.staticfiles.views import serve
File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/views.py", line 15, in <module>
  from django.contrib.staticfiles import finders
File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/finders.py", line 11, in <module>
  from django.contrib.staticfiles.storage import AppStaticStorage
File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/storage.py", line 10, in <module>
  from django.core.cache import (get_cache, InvalidCacheBackendError,
File "/usr/local/lib/python2.7/dist-packages/django/core/cache/__init__.py", line 187, in <module>
  cache = get_cache(DEFAULT_CACHE_ALIAS)
File "/usr/local/lib/python2.7/dist-packages/django/core/cache/__init__.py", line 172, in get_cache
  backend, location, params = parse_backend_conf(backend, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/core/cache/__init__.py", line 125, in parse_backend_conf
  backend = args.pop('BACKEND')
KeyError: 'BACKEND'
回溯(最近一次呼叫最后一次):
文件“manage.py”,第14行,在
执行\u管理器(设置)
文件“/usr/local/lib/python2.7/dist-packages/django/core/management/__-init__.py”,第459行,在执行管理器中
utility.execute()
文件“/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py”,执行中第382行
self.fetch_命令(子命令)。从_argv(self.argv)运行_
文件“/usr/local/lib/python2.7/dist-packages/django/core/management/__-init__.py”,第261行,在fetch_命令中
klass=加载命令类(应用程序名称,子命令)
文件“/usr/local/lib/python2.7/dist-packages/django/core/management/__-init__.py”,第69行,装入命令类
模块=导入模块(“%s.management.commands.%s%”(应用程序名称,名称))
文件“/usr/local/lib/python2.7/dist packages/django/utils/importlib.py”,第35行,在导入模块中
__导入(名称)
文件“/usr/local/lib/python2.7/dist packages/django/contrib/staticfiles/management/commands/runserver.py”,第4行,在
从django.core.management.commands.runserver导入BaseRunserverCommand
文件“/usr/local/lib/python2.7/dist packages/django/core/management/commands/runserver.py”,第8行,在
从django.core.servers.basehttp导入AdminMediaHandler,运行WSGIServerException,获取内部wsgi应用程序
文件“/usr/local/lib/python2.7/dist packages/django/core/servers/basehttp.py”,第28行,在
从django.contrib.staticfiles导入处理程序
文件“/usr/local/lib/python2.7/dist packages/django/contrib/staticfiles/handlers.py”,第8行,在
从django.contrib.staticfiles.views导入服务
文件“/usr/local/lib/python2.7/dist packages/django/contrib/staticfiles/views.py”,第15行,在
从django.contrib.staticfiles导入查找器
文件“/usr/local/lib/python2.7/dist packages/django/contrib/staticfiles/finders.py”,第11行,在
从django.contrib.staticfiles.storage导入AppStaticStorage
文件“/usr/local/lib/python2.7/dist packages/django/contrib/staticfiles/storage.py”,第10行,在
从django.core.cache导入(获取缓存,InvalidCacheBackendError,
文件“/usr/local/lib/python2.7/dist-packages/django/core/cache/__-init__.py”,第187行,在
缓存=获取缓存(默认缓存别名)
文件“/usr/local/lib/python2.7/dist-packages/django/core/cache/__-init__.py”,第172行,在get_缓存中
后端,位置,参数=parse_backend_conf(后端,**kwargs)
文件“/usr/local/lib/python2.7/dist-packages/django/core/cache/__-init__uuuuuu.py”,第125行,在parse_-backend_-conf中
后端=args.pop('backend')
KeyError:“后端”

在Settings.py中设置后端