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 <jav...@guerrag.com> wrote:

> On Mon, Apr 16, 2012 at 6:00 AM, Nikhil Somaru <nsom...@gmail.com> 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, the
> template is where you manage _how_ is shown.
>
> from that, filtering is usually more apropriate to be done on the view.
>
> i usually don't worry too much about the template assuming the view
> works in a specific way, since templates are _so_ rarely reusable
> (except for inheritance, but i don't think it's your problem)
>
> i don't really get what do you mean by "would have to make assumptions
> about the type of context variables", filtering data (in the view)
> usually shoudln't change type of variables (querysets are still
> querysets), it should only change the content of them.
>
> --
> Javier
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Yours,
Nikhil Somaru

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to