Installation
$ [sudo] pip install django-http-etag-view
Examples
get_http_etag
from django_http_etag_view.views import HttpEtagMixin
class MyView(HttpEtagMixin,...):
def get_http_etag(self):
return 'XXX'
dispatch
, self.http_etag
:
class MyView(HttpEtagMixin,...):
def dispatch(self, *args, **kwargs):
self.http_etag = 'XXX'
return super().dispatch(*args, **kwargs)