尝试在ec2上部署django时出错

时间:2012-08-12 12:14:33

标签: python django ubuntu amazon-ec2

我正在尝试部署现在在ec2 ubuntu服务器上本地运行的django。我在尝试运行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'

1 个答案:

答案 0 :(得分:1)

在Settings.py中设置后端