diff options
author | 2013-09-29 10:49:41 +0200 | |
---|---|---|
committer | 2013-09-29 11:01:09 +0200 | |
commit | 8c6bdebcabb9bc60a6beed35d7b74c5e768b708c (patch) | |
tree | 5389e905191dc0683b4cfa9c7dea212b91b57fe8 | |
parent | Merge pull request #22 from volpino/master (diff) | |
download | euscan-8c6bdebcabb9bc60a6beed35d7b74c5e768b708c.tar.gz euscan-8c6bdebcabb9bc60a6beed35d7b74c5e768b708c.tar.bz2 euscan-8c6bdebcabb9bc60a6beed35d7b74c5e768b708c.zip |
fixes
-rw-r--r-- | euscanwww/djeuscan/urls.py | 2 | ||||
-rw-r--r-- | euscanwww/euscan_captcha/__init__.py | 12 | ||||
-rw-r--r-- | euscanwww/euscan_captcha/forms.py | 5 | ||||
-rw-r--r-- | euscanwww/euscan_captcha/urls.py | 14 |
4 files changed, 16 insertions, 17 deletions
diff --git a/euscanwww/djeuscan/urls.py b/euscanwww/djeuscan/urls.py index ad36685..be2e33f 100644 --- a/euscanwww/djeuscan/urls.py +++ b/euscanwww/djeuscan/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls.defaults import url, patterns, include +from django.conf.urls import url, patterns, include from django.contrib.auth.decorators import user_passes_test from djcelery.views import apply as apply_task diff --git a/euscanwww/euscan_captcha/__init__.py b/euscanwww/euscan_captcha/__init__.py index a6b282a..cfb4ead 100644 --- a/euscanwww/euscan_captcha/__init__.py +++ b/euscanwww/euscan_captcha/__init__.py @@ -1,6 +1,6 @@ -from registration.backends.default import DefaultBackend -from forms import RegistrationFormCaptcha - -class CaptchaDefaultBackend(DefaultBackend): - def get_form_class(self, request): - return RegistrationFormCaptcha +#from registration.backends.default import DefaultBackend +#from forms import RegistrationFormCaptcha +# +#class CaptchaDefaultBackend(DefaultBackend): +# def get_form_class(self, request): +# return RegistrationFormCaptcha diff --git a/euscanwww/euscan_captcha/forms.py b/euscanwww/euscan_captcha/forms.py index 7e84816..d5f1185 100644 --- a/euscanwww/euscan_captcha/forms.py +++ b/euscanwww/euscan_captcha/forms.py @@ -1,8 +1,9 @@ +from django.conf import settings + from captcha.fields import ReCaptchaField from registration.forms import RegistrationForm -from django.conf import settings -class RegistrationFormCaptcha(RegistrationForm): +class RecaptchaRegistrationForm(RegistrationForm): captcha = ReCaptchaField( public_key=settings.RECAPTCHA_PUBLIC_KEY, private_key=settings.RECAPTCHA_PRIVATE_KEY, diff --git a/euscanwww/euscan_captcha/urls.py b/euscanwww/euscan_captcha/urls.py index 76cbd2e..435ba5c 100644 --- a/euscanwww/euscan_captcha/urls.py +++ b/euscanwww/euscan_captcha/urls.py @@ -1,12 +1,10 @@ -from django.conf.urls.defaults import patterns, url +from django.conf.urls import patterns, url -from registration.views import register +from views import RecaptchaRegistrationView -urlpatterns = patterns('', - url( +urlpatterns = patterns( + '', url( r'^register/$', - register, - {'backend': 'euscanwww.captcha.CaptchaDefaultBackend'}, - name='registration_register' - ), + RecaptchaRegistrationView.as_view(), + name='registration_register'), ) |