Friday, April 29, 2011

queryset._clone() in generic views

What is 'queryset = queryset._clone()' statement in
django.views.generic.list_detail.object_list view used for?
Has it something to do with prevention of usage of cached results, to
allow QuerySet to reflect changes made to the database?
Should I use _clone(), too, if I'm reimplementing this view in order
to add some filtering? Or, maybe, I should use QuerySet.all() method
instead (i.e., 'queryset = queryset.all())?

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment