diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-05-09 15:18:10 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-05-09 15:18:10 -0400 |
commit | 56af1f30e5fc9bcab600d57506dc06db167730b1 (patch) | |
tree | 2231a41a02c547bb63417aa5747daa084f0e1cfd /django_authopenid | |
parent | 5ec0ae6635bc9ece491c23b18507f2a558ce14e5 (diff) | |
download | askbot-56af1f30e5fc9bcab600d57506dc06db167730b1.tar.gz askbot-56af1f30e5fc9bcab600d57506dc06db167730b1.tar.bz2 askbot-56af1f30e5fc9bcab600d57506dc06db167730b1.zip |
finished moving settings to livesettings, available at url /settings
Diffstat (limited to 'django_authopenid')
-rw-r--r-- | django_authopenid/forms.py | 3 | ||||
-rw-r--r-- | django_authopenid/views.py | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/django_authopenid/forms.py b/django_authopenid/forms.py index 2f34986c..2fd3fd7f 100644 --- a/django_authopenid/forms.py +++ b/django_authopenid/forms.py @@ -35,6 +35,7 @@ from django.contrib.auth.models import User from django.contrib.auth import authenticate from django.utils.translation import ugettext as _ from django.conf import settings +from forum.conf import settings as forum_settings import types import re from django.utils.safestring import mark_safe @@ -254,7 +255,7 @@ class ChangeEmailForm(forms.Form): def clean_email(self): """ check if email don't exist """ if 'email' in self.cleaned_data: - if settings.EMAIL_UNIQUE == True: + if forum_settings.EMAIL_UNIQUE == True: try: user = User.objects.get(email = self.cleaned_data['email']) if self.user and self.user == user: diff --git a/django_authopenid/views.py b/django_authopenid/views.py index 0212955c..688a41fc 100644 --- a/django_authopenid/views.py +++ b/django_authopenid/views.py @@ -508,7 +508,7 @@ def register(request): #if user just logged in and did not need to create the new account if user_ != None: - if settings.EMAIL_VALIDATION == 'on': + if forum_settings.EMAIL_VALIDATION == True: logging.debug('sending email validation') send_new_email_key(user_,nomessage=True) output = validation_email_sent(request) @@ -750,7 +750,7 @@ def set_new_email(user, new_email, nomessage=False): user.email = new_email user.email_isvalid = False user.save() - if settings.EMAIL_VALIDATION == 'on': + if forum_settings.EMAIL_VALIDATION == True: send_new_email_key(user,nomessage=nomessage) def _send_email_key(user): @@ -788,7 +788,7 @@ def send_email_key(request): authopenid/changeemail.html template """ - if settings.EMAIL_VALIDATION != 'off': + if forum_settings.EMAIL_VALIDATION == True: if request.user.email_isvalid: return render_to_response('authopenid/changeemail.html', { 'email': request.user.email, @@ -818,7 +818,7 @@ def verifyemail(request,id=None,key=None): url = /email/verify/{{user.id}}/{{user.email_key}}/ """ logging.debug('') - if settings.EMAIL_VALIDATION != 'off': + if forum.settings.EMAIL_VALIDATION == True: user = User.objects.get(id=id) if user: if user.email_key == key: @@ -855,7 +855,7 @@ def changeemail(request, action='change'): if form.is_valid(): new_email = form.cleaned_data['email'] if new_email != user_.email: - if settings.EMAIL_VALIDATION == 'on': + if forum_settings.EMAIL_VALIDATION == True: action = 'validate' else: action = 'done_novalidate' |