Mixin for class-based views that support ETags.
- class ETagViewMixin¶
Mixin to handle ETag generation for a page.
This enables ETag support in the view for HTTP GET requests. On a request,
get_etag_data()will be called, which will calculate an ETag for the content. If the client already knows this ETag, it will receive a HTTP 304 Not Modified. Otherwise, it will return a response with that ETag attached.
This currently only supports ETags for HTTP GET and HEAD methods.
- dispatch(request, *args, **kwargs)¶
Handle a HTTP request and dispatch to a handler.