diff options
-rw-r--r-- | bitbake/lib/toaster/toastergui/widgets.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/widgets.py b/bitbake/lib/toaster/toastergui/widgets.py index e58dd7c236..6bb388936c 100644 --- a/bitbake/lib/toaster/toastergui/widgets.py +++ b/bitbake/lib/toaster/toastergui/widgets.py | |||
@@ -20,6 +20,7 @@ | |||
20 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 20 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
21 | 21 | ||
22 | from django.views.generic import View, TemplateView | 22 | from django.views.generic import View, TemplateView |
23 | from django.views.decorators.cache import cache_control | ||
23 | from django.shortcuts import HttpResponse | 24 | from django.shortcuts import HttpResponse |
24 | from django.http import HttpResponseBadRequest | 25 | from django.http import HttpResponseBadRequest |
25 | from django.core import serializers | 26 | from django.core import serializers |
@@ -64,6 +65,11 @@ class ToasterTable(TemplateView): | |||
64 | orderable=True, | 65 | orderable=True, |
65 | field_name="id") | 66 | field_name="id") |
66 | 67 | ||
68 | # prevent HTTP caching of table data | ||
69 | @cache_control(must_revalidate=True, max_age=0, no_store=True, no_cache=True) | ||
70 | def dispatch(self, *args, **kwargs): | ||
71 | return super(ToasterTable, self).dispatch(*args, **kwargs) | ||
72 | |||
67 | def get_context_data(self, **kwargs): | 73 | def get_context_data(self, **kwargs): |
68 | context = super(ToasterTable, self).get_context_data(**kwargs) | 74 | context = super(ToasterTable, self).get_context_data(**kwargs) |
69 | context['title'] = self.title | 75 | context['title'] = self.title |