• 4.1
  • dev
  • Documentation version: 4.0

Codice sorgente per django.contrib.sites.middleware

from django.utils.deprecation import MiddlewareMixin

from .shortcuts import get_current_site


[documenti]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