euscanwww: moving captcha app where the apps should be

Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
volpino
2012-11-01 16:29:27 +01:00
parent 6f421cfe13
commit 352dfa9e14
4 changed files with 1 additions and 1 deletions

View File

@ -0,0 +1,6 @@
from registration.backends.default import DefaultBackend
from forms import RegistrationFormCaptcha
class CaptchaDefaultBackend(DefaultBackend):
def get_form_class(self, request):
return RegistrationFormCaptcha

View File

@ -0,0 +1,5 @@
from captcha.fields import ReCaptchaField
from registration.forms import RegistrationForm
class RegistrationFormCaptcha(RegistrationForm):
captcha = ReCaptchaField(attrs={'theme': 'white'})

View File

@ -0,0 +1,12 @@
from django.conf.urls.defaults import patterns, url
from registration.views import register
urlpatterns = patterns('',
url(
r'^register/$',
register,
{'backend': 'euscanwww.captcha.CaptchaDefaultBackend'},
name='registration_register'
),
)