Re: Re: Re: More complex QuerySets and generic views

2006-08-15 Thread Jon Atkinson
> You're using a variable "feedtype" that's not defined. > > It's the same thing as doing this in the Python interactive prompt: > > print a + 1 > > The variable "a" is not defined yet, so Python raises a NameError. > > The problem in your case is that your view won't know the value of > feedt

Re: Re: Re: More complex QuerySets and generic views

2006-08-15 Thread Jon Atkinson
> > I think it's worth raising a feature request in the Django Trac for > this functionality. I can imagine that this would be very useful to a > lot of people in the future. > > Michael Done! http://code.djangoproject.com/ticket/2544 --Jon --~--~-~--~~~---~--~~

Re: Re: More complex QuerySets and generic views

2006-08-15 Thread Adrian Holovaty
On 8/15/06, Jon Atkinson <[EMAIL PROTECTED]> wrote: > (r'^/?(?P\w+)/$', > 'django.views.generic.list_detail.object_list', {'queryset': > Item.objects.filter(feed__feedtype__feedtype__iexact=feedtype).order_by('-time'), > 'paginate_by': 15, 'extra_context': {'is_first_page': True}}), > > And oddly

Re: Re: More complex QuerySets and generic views

2006-08-15 Thread Michael van der Westhuizen
Hi Jon, On 8/15/06, Jon Atkinson <[EMAIL PROTECTED]> wrote: [snip] > I've just tried removing the regular expression - so the line looks like: > > (r'^/?(?P\w+)/$', > 'django.views.generic.list_detail.object_list', {'queryset': > Item.objects.filter(feed__feedtype__feedtype__iexact=feedtype).orde

Re: Re: More complex QuerySets and generic views

2006-08-15 Thread Jon Atkinson
On 15/08/06, Michael van der Westhuizen <[EMAIL PROTECTED]> wrote: > > Do you really need the RE in the query? I think the problem is that > the re call is being evaluated immediately, which the query is lazily > evaluated. Would the "iexact" not work without the regular expression? > > If you do