docco for middleware

This commit is contained in:
Seth Ladygo
2019-03-12 23:03:49 -07:00
parent ea902ead0b
commit c35f0db869

View File

@ -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): 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): def __init__(self, get_response):
self.get_response = get_response self.get_response = get_response