I have seen enough number of examples that allow me to declare a new variable inside a template and set its value. But what I want to do is to update the value of a particular variable inside the template.
For example I have a datetime field for an object and I want to add timezone according to the request.user
from the template. So I will create a template filter
like {% add_timezone object.created %}
and what it will do is that it will add timezone to object.created
and after that whenever I access {{object.created}}
it will give me the updated value.
Can anybody tell me how this can be done. I know I need to update the context
variable from the template filter. But don't know how.