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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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