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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-http-last-modified-view-2020.10.29.tar.gz
.
File metadata
- Download URL: django-http-last-modified-view-2020.10.29.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f72d9ba823a77bb1be30f1f59c4598e8fe2e7236869ba7b64572cd3e4d42693 |
|
MD5 | 699b85dc50a46df275cafc1928747c8f |
|
BLAKE2b-256 | ca284176b5403e9291197b4e9667ffc25d0f7d7f10f0911f2f926da0b9ab7f9c |