This is my middleware:
class Go():
def process_view(self, request, view_func, view_args, view_kwargs):
aaa = "hello"
return None
If I go into my views.py and print aaa
, I get an error.
This is my middleware:
class Go():
def process_view(self, request, view_func, view_args, view_kwargs):
aaa = "hello"
return None
If I go into my views.py and print aaa
, I get an error.
If you want it available in your views, you can add anything you want to the request
object as that's ultimately passed down to your views.
request.myvar = 'hello'