On Thu, Jun 30, 2011 at 3:51 PM, Michael Blume <[email protected]> wrote:
> First of all, I find it mildly odd that the context processor takes
> precedence over the variable explicitly set, but that's obviously arguable.
> Would it be possible for Django to kick up some kind of warning in cases
> like this, at least in debug mode?
Switching so that explicit sets took precedence would be backwards-incompatible.
django.template.context.RequestContext.__init__, I think you're
suggesting something like this (untested):
if settings.DEBUG:
new_dict = processor(request)
for k in new_dict.keys():
if k in self:
warning.warn("while processing %s, found %s
which will shadow an existing key" % (processor, k))
self.update(processor(request))
Does that achieve what you're after?
--
You received this message because you are subscribed to the Google Groups
"Django developers" 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-developers?hl=en.