#17085: Deprecate "add_to_builtins" and replace with API on Template
---------------------------------+------------------------------------
Reporter: carljm | Owner: nobody
Type: New feature | Status: new
Component: Template system | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by ptone):
* stage: Unreviewed => Accepted
Comment:
add_to_builtins is not a documented function - but seems to have made it
into use extensive in the wild.
its primary use currently in Django is either:
add the truly global builtin tags and filters in template/base.py
add template tags into builtin space as a convenience for tests
the API you propose sounds like a python level alternative to the load
tag.
From the context of the template, this is magic and far less explicit than
using the load tag
It looks like most of the wild use of add_to_builtins is to provide
"convenience" by 3rd party apps to make their tags global. But I would
say that they should be re-documented as requiring the load tag in the
users base.html if they want it everywhere
I think a deprecation of add_to_builtins with a replacement of
_add_to_builtins could be done to get the message. But I think we should
be encouraging more explicitness in the template space, not enabling less.
--
Ticket URL: <https://code.djangoproject.com/ticket/17085#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.