You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
123456789101112 |
- from django.utils.deprecation import MiddlewareMixin
-
- from .shortcuts import get_current_site
-
-
- class CurrentSiteMiddleware(MiddlewareMixin):
- """
- Middleware that sets `site` attribute to request object.
- """
-
- def process_request(self, request):
- request.site = get_current_site(request)
|