docco for middleware
This commit is contained in:
@ -1,7 +1,18 @@
|
||||
# https://docs.djangoproject.com/en/2.1/topics/http/middleware/
|
||||
# https://stackoverflow.com/questions/12596722/django-identify-app-in-template
|
||||
"""
|
||||
Middleware classes used throughout the project.
|
||||
|
||||
See https://docs.djangoproject.com/en/2.1/topics/http/middleware/
|
||||
"""
|
||||
|
||||
class SetApplicationName(object):
|
||||
"""
|
||||
Set request.current_app to the name of the app the current
|
||||
view belongs to. This ends up being the first component
|
||||
of the package name.
|
||||
|
||||
See:
|
||||
https://stackoverflow.com/questions/12596722/django-identify-app-in-template
|
||||
"""
|
||||
|
||||
def __init__(self, get_response):
|
||||
self.get_response = get_response
|
||||
|
||||
Reference in New Issue
Block a user