Re: [Question] Filter Queryset in a Template

2012-04-18 Thread Daniel Sokolowski
%} ... {% endfor %} Example code here http://dpaste.com/733698/ From: Nikhil Somaru Sent: Tuesday, April 17, 2012 9:24 PM To: django-users@googlegroups.com Subject: Re: [Question] Filter Queryset in a Template Thanks for the replies guys. I realised I was over thinking the matter. I'm just going

Re: [Question] Filter Queryset in a Template

2012-04-17 Thread Nikhil Somaru
Thanks for the replies guys. I realised I was over thinking the matter. I'm just going to do the necessary work in the view for now, get it *working*, and then worry about optimising later. On 16 April 2012 19:16, Javier Guerra Giraldez wrote: > On Mon, Apr 16, 2012 at 6:00 AM, Nikhil Somaru w

Re: [Question] Filter Queryset in a Template

2012-04-16 Thread Javier Guerra Giraldez
On Mon, Apr 16, 2012 at 6:00 AM, Nikhil Somaru wrote: > If I do the filtering in views.py, I the template would have to make > assumptions about the type of context variables I will be passing it. > > Or am I seeing this the wrong way? i think so. the view is where you manage _what_ is shown, t

Re: [Question] Filter Queryset in a Template

2012-04-16 Thread waax
You can use templatetags for example: https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs On Saturday, April 14, 2012 10:51:51 AM UTC+2, Nikhil Somaru wrote: > > Greetings, > > > I would like to do something like queryset filtering in a template. Is the > only solution via

Re: [Question] Filter Queryset in a Template

2012-04-16 Thread Nikhil Somaru
I appreciate your reply, but you haven't quite helped me out. If I do the filtering in views.py, I the template would have to make assumptions about the type of context variables I will be passing it. Or am I seeing this the wrong way? On 15 April 2012 00:41, dummyman dummyman wrote: > do the

Re: [Question] Filter Queryset in a Template

2012-04-14 Thread dummyman dummyman
do the filtering part in views.py . templates is meant only for visual purpose On Sat, Apr 14, 2012 at 2:21 PM, Nikhil Somaru wrote: > Greetings, > > > I would like to do something like queryset filtering in a template. Is the > only solution via a template tag? > > > # models.py > > class Stude