Middleware
- class middleware.TraceExtrasMiddleware(get_response)
Adds additional tracing information to current span
- class middleware.MemoryUsageMiddleware(get_response)
Logs memory used before and after request is handled by the view. Prints out the memory usage and allocated by the view along with the url being requested.
- get_memory() int
Resident Set Size - amount of memory in bytes used by current process
- middleware.meg_context_processor(request)
Context processor that injects custom values to templates, such as settings:
NULL_PLACEHOLDER:strLazy-translated String used to represent null value in user interfaces (i.e. “-“). The value is set by
settings.NULL_PLACEHOLDERand is expected to be a lazy-translated string.browser_supported:boolTells whether the browser making the request is officially supported, or
Trueif check is suppressed bySUPPRESS_BROWSER_CHECK.cache_duration:intdefault cache duration setting as set by
CACHE_DURATION.
- class middleware.AdminSecurityMiddleware(get_response)
Restricts super/global users with weak security from accessing admin site.
- class middleware.MetadataMiddleware(get_response)
Add metadata to response headers
- class middleware.CacheControlMiddleware(get_response)
Middleware processor to update response with cache-control header if they don’t have any. If this header is not there, it is set to no-cache so that django views won’t cache response.