django-http-etag-view

Django http Etag header view mixin


Keywords
django, Etag, header, view
License
Unlicense
Install
pip install django-http-etag-view==2020.7.1

Documentation

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)

readme42.com