aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--euscanwww/djeuscan/urls.py2
-rw-r--r--euscanwww/euscan_captcha/__init__.py12
-rw-r--r--euscanwww/euscan_captcha/forms.py5
-rw-r--r--euscanwww/euscan_captcha/urls.py14
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'),
)