#17085: Deprecate "add_to_builtins"
-------------------------------------------+------------------------
               Reporter:  carljm           |          Owner:  nobody
                   Type:  New feature      |         Status:  new
              Component:  Template system  |        Version:  SVN
               Severity:  Normal           |       Keywords:
           Triage Stage:  Unreviewed       |      Has patch:  0
    Needs documentation:  0                |    Needs tests:  0
Patch needs improvement:  0                |  Easy pickings:  0
                  UI/UX:  0                |
-------------------------------------------+------------------------
 `add_to_builtins` modifies global process state. This is to be avoided
 whenever possible, and in this case there would be a much better
 alternative: provide an API on a Template object to inject templatetag
 libraries as "built-in" for that Template. This provides the same effect
 as `add_to_builtins` but in a localized and explicit way. If the tag
 library should be effectively built-in for the whole project, just use a
 custom `render_to_response` equivalent (or `TemplateResponse` subclass)
 that uses this API to inject the library for each Template rendered.

 Deprecating `add_to_builtins` is another step on the path of cleaning up
 globally-stored settings-related state in Django, which needs to be done
 if we're going to clean up settings as process-global.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17085>
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to