版本问题
引文:http://stackoverflow.com/questions/16110659/django-viewdoesnotexist-error-after-installing-photologue
|
I'm using Django 1.5.1. Everything was OK. But as soon as I installed django-photologue through pip I face this error when I visit admin url:
>**ViewDoesNotExist at /admin/**
Could not import django.views.generic.list_detail.object_list. Parent module django.views.generic.list_detail does not exist.
Request Method: GET
Request URL: http://localhost:8000/admin/
Django Version: 1.5.1
Exception Type: ViewDoesNotExist
Exception Value:
Could not import django.views.generic.list_detail.object_list. Parent module django.views.generic.list_detail does not exist.
Exception Location: /usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py in get_callable, line 104
Python Executable: /usr/bin/python
Python Version: 2.7.3
Also when I run syncdb, photologue sync with database without any error and I can import it in shell.
Any idea about how can I solve this error?
|
|
|
|
to replace the file in the directory urls.py photologue :
"django.views.generic.date_based"and"django.views.generic.list_detail" on "django.views.generic"
"object_list" on "list.ListView"
"object_detail" on "detail.DetailView"
"archive_year" on "dates.YearArchiveView"
"archive_month" on "dates.MonthArchiveView"
"archive_day" on "dates.DayArchiveView"
like this :)
|