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. > The generic rule is that most processing should happen in python code, > not in your template. Indeed. But in Django, Python code is not restricted to views, and another generic rule is that a view should NOT have to deal with orthogonal concerns - IOW, it should do the very minimal possible thing and nothing else. Template code is where the integration between different (preferably well decoupled) apps happens - it's really the "glue" layer of your project - so whatever is part of your project but none of the concern of a specific view should happen. NB : when I say "template code", this includes template tags and filters, context processors and eventually middlewares... -- 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.