3👍
✅
I think you need something like this:
new_context = {'page_url': url}
new_context.update(context)
return new_context
Hope this helps
1👍
Before updating the existing context, push()
it onto the stack. After having rendered your template with a modified context, pop()
it to restore the previous values.
This is documented here.
- [Django]-How to reference a slug from a different model in get_success_url?
- [Django]-Django only submitting csrf token in forms?
Source:stackexchange.com