There is no way to do it in urls.py. But you may write wrapper view
that will filter queryset and then pass it to generic view.
On 9 янв, 01:19, "Shishir Ramam" <[EMAIL PROTECTED]> wrote:
> I'd like to pass a parameter from a url to a query set of a generic view.
>
> Something like the following. I'm not sure if this is possible, but would
> appreciate any tips
> on how this can be accomplished.
>
> thanks,
> -shishir
>
> my_info_dict = {
> 'queryset': my_model.objects.filter(field_name=field_value),
>
> }
>
> urlpatterns = patterns('',
> (r'^field_name/(?P<field_value>\w+)/$',
> django.views.generic.list_detail.object_list))
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---