What's the difference between django.views.generic.ListView and django.views.generic.list_detail?
36 views
Skip to first unread message
Dae_James
unread,
Nov 21, 2012, 12:32:15 AM11/21/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
What's the difference between django.views.generic.ListView and django.views.generic.list_detail?
I think the two have same function. Only the usage of them are different. Why do both of them exist?
Ankur Sethi
unread,
Nov 21, 2012, 1:38:19 AM11/21/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
On Wed, Nov 21, 2012 at 11:02 AM, Dae_James <daed...@126.com> wrote:
What's the difference between django.views.generic.ListView and django.views.generic.list_detail?
I think the two have same function. Only the usage of them are different. Why do both of them exist?
The django.views.generic.list_detail module contains a number of function-based generic views (object_detail, object_list), which used to be how generic views were done in Django prior to (IIRC) Django 1.3. On the other hand, django.views.generic.ListView is a class-based generic view, introduced in Django 1.3 (again IIRC).
In newer versions of Django, function-based generic views have been deprecated in favor of class-based views.
Does that answer your question?
Dae James
unread,
Nov 21, 2012, 10:53:23 PM11/21/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message