gergelypolonkai-web-django/gergelypolonkaiweb/middleware/viewname.py

6 lines
218 B
Python

class ViewNameMiddleware(object):
def process_view(self, request, view_func, view_args, view_kwargs):
request.test = "TEST"
request.view_name = ".".join((view_func.__module__, view_func.__name__))