Lets say I have a function where I am passing template:
def somefunc(template, **kwargs):
body = render_to_string(tempate, {"kwargs":kwargs})
In my template I want to access this kwargs value:
Hellooww {{kwargs['username'}}, welcome to the site...
But I am not getting this username. Can it be done this way?
Thank you
You could use via view.kwargs for access to kwargs accessible in View:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With