Commits

Guilherme Gondim committed 5223329

Never cache entry preview

  • Participants
  • Parent commits 5f9af51

Comments (0)

Files changed (1)

File diario/views.py

 
 from django.contrib import auth
 from django.shortcuts import get_object_or_404
+from django.views.decorators.cache import never_cache
 from django.views.generic import dates, DetailView, ListView
 
 from taggit.models import Tag
     """
     queryset = models.Entry.objects.all()
 
+    @never_cache
+    def dispatch(self, *args, **kwargs):
+        return super(EntryPreviewView, self).dispatch(*args, **kwargs)
+
     def get_object(self, *args, **kwargs):
         obj = super(EntryPreviewView).get_object(*args, **kwargs)
         user = self.request.user