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 end up needing the RE, you could try using a custom manager > on your feeds model. Specifically, you could create a custom manager > method which filters based on the regular expression, then pass that > the captured feedtype from the URL. > > See http://www.djangoproject.com/documentation/model_api/#managers for > details of custom managers and adding methods to them. > > Michael
I've just tried removing the regular expression - so the line looks like: (r'^/?(?P<feedtype>\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 enough I'm getting exactly the same error; is there another problem with this statement which I'm not seeing? It seems there is a problem with variable from the url expression being passed to the view function - is this a common problem? --Jon --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---