On Jul 4, 2:17 pm, Mitar <mmi...@gmail.com> wrote: > Hi! > > I have opened a ticket and would like some feedback on it. Do you > think it is a good idea? > > Ticket description: > > Allow context processors access to current version of context so that > they can change values and not just override them. This can be easily > done with another argument, context, and also backwards compatible. > Functions would only get additional argument if they are defined to > get two arguments and whatever they would return would override that > in the context. > > http://code.djangoproject.com/ticket/13841 > > Mitar
I came upon your ticket whilst triaging and feel that the best way to advance your issue is to present a clear and concise use case of where modifying a context is useful. The design of the context is such that it is a list of dictionaries, while I'm new to the internals - someone else could speak as to why the the original design is such that the last line of RequestContext is: self.update(processor(request)) instead of: processor(request, self) in otherwords why contexts are passed around for modification - and instead are updated. I think the patch for your ticket would be as simple as changing it to: self.update(processor(request,context=self)) Again - being new to internals I'm not sure what ramifications that would have. But in attempting to triage your ticket, maybe this post will act as a foil for discussion. -Preston -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@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.