我正在制作一个Django网站,在我的Ubuntu命令行中输入./manage.py shell
后出现此错误:
/home/deanna/django_test/static/
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/deanna/django-deanna/local/lib/python2.7/site-packages/Django-1.7.4-py2.7.egg/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/home/deanna/django-deanna/local/lib/python2.7/site-packages/Django-1.7.4-py2.7.egg/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/home/deanna/django-deanna/local/lib/python2.7/site-packages/Django-1.7.4-py2.7.egg/django/__init__.py", line 20, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/home/deanna/django-deanna/local/lib/python2.7/site-packages/Django-1.7.4-py2.7.egg/django/utils/log.py", line 87, in configure_logging
logging_config_func(logging_settings)
File "/usr/lib/python2.7/logging/config.py", line 794, in dictConfig
dictConfigClass(config).configure()
File "/usr/lib/python2.7/logging/config.py", line 627, in configure
'%r: %s' % (name, e))
ValueError: Unable to configure logger 'django_request': Unable to add handler 'request_handler': 'request_handler'
经过对SO和互联网的大量研究后,我想知道安装Apache服务器是否会修复此错误?我安装了gunicorn
但是足以运行Django网站吗?
编辑:这是我的亚马逊s3 settings.py
的一部分:
try:
from local_settings import *
except Exception as e:
print e.message
if not DEBUG:
AWS_STORAGE_BUCKET_NAME = os.environ['AWS_STORAGE_BUCKET_NAME']
AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID']
STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
S3_URL = 'http://%s.s3.amazonaws.com/assets/' % AWS_STORAGE_BUCKET_NAME
STATIC_URL = S3_URL
答案 0 :(得分:0)
./manage.py shell
不依赖于Apache。你的错误来自其他地方。
我看到您正在尝试使用位于主目录中的Django库。用pip正确安装Django怎么样?
pip install Django