diff --git a/procat2/middleware.py b/procat2/middleware.py index 4b8ed1d..db47004 100644 --- a/procat2/middleware.py +++ b/procat2/middleware.py @@ -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