Yes, thank you very much. I got it.



Dae James

From: Ankur Sethi
Date: 2012-11-21 15:08
To: django-users
Subject: Re: What's the difference between django.views.generic.ListView and 
django.views.generic.list_detail?
On Wed, Nov 21, 2012 at 11:02 AM, Dae_James <daeda...@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?
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to