Cheers bill!
Figured it out already.
However i'm stuck on the database problem which i wrote in a separate email.
Stan
Best Regards,
Stanwin Siow
On Feb 19, 2012, at 9:34 PM, Bill Freeman wrote:
> Yes, you can, as part of the extra context, by whatever name doesn't
> collide. Then you
> co
Yes, you can, as part of the extra context, by whatever name doesn't
collide. Then you
could use it in your template, in a "for" tag.
You could also pass another one, by a name other than "queryset" at
the same level as
the first one, but that becomes an argument to the view, so don't
expect it t
Hi Stanwn,
try this:
def get_keyword():
return Keyword.objects.all()
UserProfile_info = {
"queryset" : UserProfile.objects.all(),
"extra_context" : {"keyword_list" : get_keyword }
}
Now you can use the variable {{ keyword_list }} to populate the template.
Alfredo
2012/2/19 Stan
Hi,
I'm not sure that I've understand your question:
url(r'^profile/(?P\d+)/(?P\d+)$', ..)
and now you can use the variable var_1 and var_2 in your function.
Alfredo
2012/2/18 Stanwin Siow
> Hello,
>
> I want to find out if there is anyway to pass two querysets into a url
> pattern.
>
Hello,
I want to find out if there is anyway to pass two querysets into a url pattern.
i have this url pattern at the moment.
UserProfile_info = {
"queryset" : UserProfile.objects.all(),
"extra_context" : {"keyword_list" : Keyword.objects.all}
}
url(r'^profile/$', list_detail.objec
5 matches
Mail list logo