• 1.11
  • dev
  • Documentation version: 2.0

Source code for django.contrib.sites.middleware

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)
Back to Top