#11234: BlockNode unsafely manages context
---------------------------------------------+------------------------------
Reporter: brutimus | Owner: brutimus
Status: assigned | Milestone:
Component: Template system | Version: SVN
Resolution: | Keywords:
Stage: Design decision needed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 1
Needs_better_patch: 0 |
---------------------------------------------+------------------------------
Comment (by brutimus):
I figure since the official documentation demonstrates how to update the
context, then django should do it's best to not break that functionality.
I've seen no mention anywhere saying that tags should clean up after
themselves.
http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#setting-a
-variable-in-the-context
I personally view this as more of a bugfix than an enhancement. I find it
rather silly that the block node blindly removes position 0 in the first
place.
One scenario I find it almost vital that variables can be set in one block
node, and carry across to others, is on a query-heavy page (with template
tags doing the heavy querying). I don't want to have to repeat the same
tag call in every block node that needs the results; I'd like to just run
it once and roll with it. We (my dev team) have many hundred templates
dependent on this patch and have seen no ill effects. Though I do agree,
proper testing should still be written if this bugfix/enhancement is
deemed necessary.
--
Ticket URL: <http://code.djangoproject.com/ticket/11234#comment:4>
Django <http://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
-~----------~----~----~----~------~----~------~--~---