summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-06-22 12:09:22 -0500
committerDan McGee <dan@archlinux.org>2010-06-22 12:09:22 -0500
commit081ed6c8661bbec81cdbb9029e4832b34805f37b (patch)
treee5e22d2e52453df32aa7f8a3425125efda4b7c25 /devel
parent4c96b53f2ed9551028457ad6e0b26692c3cf385b (diff)
Add 'never_cache' decorator in a bunch of places
Now that we cache everything, we need to ensure anyone doing edits and such gets the live data and not some cached version that was already updated and is now stale. Add the never_cache decorator to any of the CUD screens as well as a few others that might benefit from always being regenerated. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel')
-rw-r--r--devel/views.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/devel/views.py b/devel/views.py
index edbe4ca3..4215c0d8 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -7,6 +7,7 @@ from django.shortcuts import render_to_response
from django.template import RequestContext
from django.core.mail import send_mail
from django.db.models import Q
+from django.views.decorators.cache import never_cache
from main.models import Package, Todolist
from main.models import Arch, Repo
@@ -20,6 +21,7 @@ pwletters = ascii_letters + digits
@login_required
+@never_cache
def index(request):
'''the Developer dashboard'''
inner_q = PackageRelation.objects.filter(user=request.user).values('pkgbase')
@@ -58,6 +60,7 @@ class ProfileForm(forms.Form):
return self.cleaned_data
@login_required
+@never_cache
def change_profile(request):
if request.POST:
form = ProfileForm(request.POST)
@@ -110,6 +113,7 @@ Password: %s""" % (domain, user.username, pw),
fail_silently=False)
@user_passes_test(lambda u: u.is_superuser)
+@never_cache
def new_user_form(request):
if request.POST:
form = NewUserForm(request.POST)