Apache Django settings.py错误

时间:2013-06-20 10:41:33

标签: python django apache

我在apache的error_logs中收到以下错误,有人可以帮忙吗?

opt / Python-2.7.3 / lib / python2.7 / site-packages / django / conf / urls / defaults.py:3:DreprecationWarning:不推荐使用django.conf.urls.defaults;请改用django.conf.urls      [Thu Jun 20 10:35:49 2013] [error] DeprecationWarning)

并在浏览器级别

ImportError at /
No module named list_detail
Request Method: GET
Request URL:    http://codereview.zk.com/
Django Version: 1.5.1
Exception Type: ImportError
Exception Value:    
No module named list_detail
Exception Location: /opt/Python-2.7.3/lib/python2.7/site-packages/ReviewBoard-1.7.5-   py2.7.egg/reviewboard/reviews/views.py in <module>, line 22
Python Executable:  /usr/bin/python
Python Version: 2.7.3

在settings.py中设置

ALLOWED_HOSTS = ['localhost','172.1623.20.1333']

1 个答案:

答案 0 :(得分:3)

在Django 1.5中,不再有list_detail模块。有django.views.generic.list模块。

您应该阅读迁移文档https://docs.djangoproject.com/en/1.4/topics/generic-views-migration/