Skip to main content

Django http Last-Modified header view mixin

Project description

Installation

$ [sudo] pip install django-http-last-modified-view
views.py

get_http_last_modified

from django_http_last_modified_view.views import HttpLastModifiedMixin

class MyView(HttpLastModifiedMixin,...):

    def get_http_last_modified(self):
        return self.obj.http_last_modified

dispatch, self.http_last_modified:

class MyView(HttpLastModifiedMixin,...):
    def dispatch(self, *args, **kwargs):
        self.http_last_modified = obj.last_modified_at
        return super().dispatch(*args, **kwargs)

readme42.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page