Reputation: 6756
I have middleware which do some work for me. Is it possible to pass some data to this middleware in respect to template which will be rendered?
Lets assume that I have urls:
url(r'^some/$', direct_to_template, {'template': 'some.html'}, name='community', kwargs={'value': 'value'}),
and I would like to pass value to middleware. Is it possible?
Upvotes: 1
Views: 315
Reputation: 32404
Yes you can look at view kwargs in https://docs.djangoproject.com/en/1.4/topics/http/middleware/#process-view
Upvotes: 2