summaryrefslogtreecommitdiffstats
path: root/django_authopenid/util.py
diff options
context:
space:
mode:
authorAdolfo Fitoria <fitoria@fitoria-laptop.(none)>2010-02-09 14:12:05 -0600
committerAdolfo Fitoria <fitoria@fitoria-laptop.(none)>2010-02-09 14:12:05 -0600
commit8de2b9131ddcef647799cf8e1e79921284523073 (patch)
tree81e17d84530990e35a0accba3a7886266a601482 /django_authopenid/util.py
parent7e95e6481d1e81e43d4b442cbcf3fe37f20d89cc (diff)
parent9d1fb9890b97beb55461ca34f9757bc685461130 (diff)
downloadaskbot-8de2b9131ddcef647799cf8e1e79921284523073.tar.gz
askbot-8de2b9131ddcef647799cf8e1e79921284523073.tar.bz2
askbot-8de2b9131ddcef647799cf8e1e79921284523073.zip
Merge branch 'evgenyfadeev/master'
Conflicts: .gitignore INSTALL TODO cnprog.wsgi django_authopenid/urls.py django_authopenid/views.py drop-all-tables.sh forum/auth.py forum/managers.py forum/models.py forum/templatetags/extra_tags.py forum/views.py locale/es/LC_MESSAGES/django.mo locale/es/LC_MESSAGES/django.po settings.py settings_local.py.dist sql_scripts/update_2009_01_25_001.sql sql_scripts/update_2009_02_26_001.sql sql_scripts/update_2009_04_10_001.sql templates/authopenid/confirm_email.txt templates/authopenid/sendpw_email.txt templates/content/js/compress.bat templates/content/js/flot-build.bat templates/content/style/style.css templates/footer.html templates/question.html templates/user_reputation.html templates/user_stats.html templates/user_votes.html templates/users_questions.html urls.py
Diffstat (limited to 'django_authopenid/util.py')
-rw-r--r--django_authopenid/util.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/django_authopenid/util.py b/django_authopenid/util.py
index 11afe53b..2b9d44a2 100644
--- a/django_authopenid/util.py
+++ b/django_authopenid/util.py
@@ -7,7 +7,7 @@ import openid.store
from django.db.models.query import Q
from django.conf import settings
from django.http import str_to_unicode
-
+from django.core.urlresolvers import reverse
# needed for some linux distributions like debian
try:
@@ -22,7 +22,7 @@ from models import Association, Nonce
__all__ = ['OpenID', 'DjangoOpenIDStore', 'from_openid_response', 'clean_next']
-DEFAULT_NEXT = getattr(settings, 'OPENID_REDIRECT_NEXT', '/')
+DEFAULT_NEXT = '/' + getattr(settings, 'FORUM_SCRIPT_ALIAS')
def clean_next(next):
if next is None:
return DEFAULT_NEXT
@@ -32,6 +32,9 @@ def clean_next(next):
return next
return DEFAULT_NEXT
+def get_next_url(request):
+ return clean_next(request.REQUEST.get('next'))
+
class OpenID:
def __init__(self, openid_, issued, attrs=None, sreg_=None):
self.openid = openid_