euscanwww: moving captcha app where the apps should be
Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
6
euscanwww/euscan_captcha/__init__.py
Normal file
6
euscanwww/euscan_captcha/__init__.py
Normal 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
|
5
euscanwww/euscan_captcha/forms.py
Normal file
5
euscanwww/euscan_captcha/forms.py
Normal file
@ -0,0 +1,5 @@
|
||||
from captcha.fields import ReCaptchaField
|
||||
from registration.forms import RegistrationForm
|
||||
|
||||
class RegistrationFormCaptcha(RegistrationForm):
|
||||
captcha = ReCaptchaField(attrs={'theme': 'white'})
|
12
euscanwww/euscan_captcha/urls.py
Normal file
12
euscanwww/euscan_captcha/urls.py
Normal 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'
|
||||
),
|
||||
)
|
Reference in New Issue
Block a user