On Nov 16, 1:12 am, Roald <downa...@gmail.com> wrote:
> Hi all,
>
> Can anybody explain why template tag libraries are loaded from
> *inside* a template? The more I work with them, the more I get the
> feeling that specifying which template tags are available in a
> template should be specified in the view-code (or more general: the
> thing that loads/renders the template).

Such as a TemplateEngine...?

This seems a good candidate feature for: 
https://code.djangoproject.com/ticket/17093

>Why would I, as a back-end
> developer, make *all* of my template tags available to the front-end
> developer in *all* templates?
>
> A great benefit of moving the template tag library loading to code,
> would be that the template language could also be safely used in
> CharFields/TextFields, without the risk of users using unwanted
> template tags.
>
> Of course, for backward compatibility, this can't be changed. The
> thing I'm most interested in, though, is restricting the template tag
> libraries that can be used in a template from my view-code. This can
> be done in a backward compatible way.
>
> Opinions?
>
> Cheers, Roald

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

Reply via email to