This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2019-02-25 11:29:40 +00:00
|
|
|
"""passbook django boilerplate code"""
|
|
|
|
from django.utils.decorators import method_decorator
|
|
|
|
from django.views.decorators.cache import never_cache
|
|
|
|
|
|
|
|
|
2019-12-31 11:51:16 +00:00
|
|
|
class NeverCacheMixin:
|
2019-02-25 11:29:40 +00:00
|
|
|
"""Use never_cache as mixin for CBV"""
|
|
|
|
|
|
|
|
@method_decorator(never_cache)
|
|
|
|
def dispatch(self, *args, **kwargs):
|
|
|
|
"""Use never_cache as mixin for CBV"""
|
|
|
|
return super().dispatch(*args, **kwargs)
|