Thanks Babatunde, I was aware of your solution. I am just curious if it is
possible to make it just in the urls.py. Anyone?
Em 09/02/2013 13:20, "Babatunde Akinyanmi" <[email protected]> escreveu:

> >The problem I have is that I want to use a view (rather not modifing it)
> to show all person in a group.
>
> And if it's that you don't want to touch your view code, I'm not sure
> you'll be able to do what you seek but I'll love also to know if it's
> achievable........but I'm a noob anyway.
>
> Sent from my Windows Phone
> ------------------------------
> From: Thiago Carvalho D' Ávila
> Sent: 2/9/2013 12:23 PM
> To: Django Users
> Subject: Doubt in urls.py filter
>
> Hello Guys,
>
> The problem I have is that I want to use a view (rather not modifing it)
> to show all person in a group.
> The problem is I don't know how to use the pk in the regex to filter in
> the same line...
>
> I wanted something like:
>
> url(r'^groups/(?P<pk>\d+)/$',
> login_required(MyListView.as_view(model=Person,
> queryset=Person.objects.filter(groups__id=pk))), name='person_group_list'),
>
> With this I get:
> NameError at /clientes/
>
> name 'pk' is not defined
>
> Any hint?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to