﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
9222	Allow callable queryset in generic views	raffaele.salmaso@…	nobody	"I need to pass a variable queryset based on some external condition
(i.e. it can be Entry.objects.all() or Entry.objects.filter(...) or other), but with current implementation it is impossible,
because generic views want a queryset, which is set indefinitely (I'm thinking about the use in urls.py, not in
custom views).

Actually I wrote a simple wrapper, as
{{{
def obj_list(request, queryset, ...):
    if callable(queryset):
        queryset = queryset()
    return object_list(request, queryset, ...)

...
}}}
and pass a function which returns the queryset I need.

I found it could be useful if it is included directly in the generic views function.

The attached patch adds this functionality, and it doesn't break any previous code."		closed	Generic views	dev		wontfix			Unreviewed	1	0	1	0	0	0
