I have this Django Url:
url( r'^(?P<language>.*)/(?P<shop>.*)/(?P<brand>.*)/$', 'app.views.view_1' ),
Now, "language", "shop", "brand" are all parameters into my url and I want to read them into my custom Django Context Processor. How can I do it?
Thanks.
You can access request.resolver_match
from the context processor.
This will give you access to the resolved url parameters in request.resolver_match.kwargs
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