[Python-modules-commits] [python-social-auth] 21/322: Set no-cache on views
Wolfgang Borgert
debacle at moszumanska.debian.org
Sat Dec 24 15:12:44 UTC 2016
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to tag v0.2.10
in repository python-social-auth.
commit eaa3f567c08469f0b441467662a8e323c364808f
Author: Matías Aguirre <matiasaguirre at gmail.com>
Date: Sat Nov 1 23:30:56 2014 -0200
Set no-cache on views
---
social/apps/django_app/views.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/social/apps/django_app/views.py b/social/apps/django_app/views.py
index 9123190..5ba1d59 100644
--- a/social/apps/django_app/views.py
+++ b/social/apps/django_app/views.py
@@ -3,6 +3,7 @@ from django.contrib.auth import login, REDIRECT_FIELD_NAME
from django.contrib.auth.decorators import login_required
from django.views.decorators.csrf import csrf_exempt, csrf_protect
from django.views.decorators.http import require_POST
+from django.views.decorators.cache import never_cache
from social.utils import setting_name
from social.actions import do_auth, do_complete, do_disconnect
@@ -12,11 +13,13 @@ from social.apps.django_app.utils import psa
NAMESPACE = getattr(settings, setting_name('URL_NAMESPACE'), None) or 'social'
+ at never_cache
@psa('{0}:complete'.format(NAMESPACE))
def auth(request, backend):
return do_auth(request.backend, redirect_name=REDIRECT_FIELD_NAME)
+ at never_cache
@csrf_exempt
@psa('{0}:complete'.format(NAMESPACE))
def complete(request, backend, *args, **kwargs):
@@ -25,6 +28,7 @@ def complete(request, backend, *args, **kwargs):
redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)
+ at never_cache
@login_required
@psa()
@require_POST
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-social-auth.git
More information about the Python-modules-commits
mailing list