fixes
This commit is contained in:
parent
4fef44668c
commit
8c6bdebcab
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,8 +1,9 @@
|
||||
from captcha.fields import ReCaptchaField
|
||||
from registration.forms import RegistrationForm
|
||||
from django.conf import settings
|
||||
|
||||
class RegistrationFormCaptcha(RegistrationForm):
|
||||
from captcha.fields import ReCaptchaField
|
||||
from registration.forms import RegistrationForm
|
||||
|
||||
class RecaptchaRegistrationForm(RegistrationForm):
|
||||
captcha = ReCaptchaField(
|
||||
public_key=settings.RECAPTCHA_PUBLIC_KEY,
|
||||
private_key=settings.RECAPTCHA_PRIVATE_KEY,
|
||||
|
@ -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'),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user