Hi Ivan.
I did something similar to this a while back  (based on Hugo's work):
http://svn.zilbo.com/svn/django/magic-removal/common/utils/views/filter.py

you could expand on that if you would like.

regards
Ian

On 4/30/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
>
> Currently generic view "object_list" can't filter the list by some
> parameter in an URL. In other words this doesn't work:
>
>     (r'articles/tags/(?P<slug>[a-z]+)/',
>       'django.views.generic.list_detail.object_list',
>       {'queryset': Article, 'slug_field': 'tags__slug'})
>
> One solution is to use "object_detail" for a single Tag and get its
> article_set in a template. But it lacks pagination which becomes a
> problem very quickly. Plus using "object_detail" for a list is bad :-)
>
> I can make a patch for "object_list" doing somthing along the lines of
>
>     queryset.filter(**{'%s__exact' % slug_field: slug})
>
> ... if it would be of interest.
>
> >
>


--
[EMAIL PROTECTED] -- blog: http://feh.holsman.net/ -- PH: ++61-3-9818-0132

If everything seems under control, you're not going fast enough. -
Mario Andretti

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to