On Thu, Aug 11, 2011 at 9:52 AM, Tom Evans <tevans...@googlemail.com> wrote:

> On Wed, Aug 10, 2011 at 7:06 PM, bruno desthuilliers
> <bruno.desthuilli...@gmail.com> wrote:
> > On 10 août, 16:35, Reinout van Rees <rein...@vanrees.org> wrote:
> >>
> >> Best solution: calculate that url in your python view code and just pass
> >> it along in the context.
> >
> > Definitly not the best solution if this has to work for more than
> > exactly ONE view.
> >
>
> So instead of typing this in multiple views:
>
> context['some_var'] = request.GET.get('name')
>
> is somehow more effort than typing this in multiple templates:
>
> {% url foo request.POST|mycustomattrgetter:"name" %}
>
> The template code could be inherited, but then placing the variable in
> a context could also be done by a template context processor. Where
> you have many views that require the same context variables, this is
> easier imo.
>
> Yes I agree. Could you please explain the role of the filter here?

Thanks


-- 
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde

-- 
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