django-recaptcha 0.0.5 compat
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
This commit is contained in:
parent
975f7b1dbf
commit
808acfe13a
@ -34,7 +34,7 @@ class ScanUpstream(object):
|
|||||||
"Error while scanning upstream for package %s!",
|
"Error while scanning upstream for package %s!",
|
||||||
package
|
package
|
||||||
)
|
)
|
||||||
self.logger.debug(
|
self.logger.info(
|
||||||
"Error %s",
|
"Error %s",
|
||||||
out_json
|
out_json
|
||||||
)
|
)
|
||||||
|
6
euscanwww/euscanwww/captcha/__init__.py
Normal file
6
euscanwww/euscanwww/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/euscanwww/captcha/forms.py
Normal file
5
euscanwww/euscanwww/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/euscanwww/captcha/urls.py
Normal file
12
euscanwww/euscanwww/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'
|
||||||
|
),
|
||||||
|
)
|
@ -267,3 +267,4 @@ except ImportError, ex:
|
|||||||
os.environ['ROOT'] = PORTAGE_ROOT
|
os.environ['ROOT'] = PORTAGE_ROOT
|
||||||
os.environ['PORTAGE_CONFIGROOT'] = PORTAGE_CONFIGROOT
|
os.environ['PORTAGE_CONFIGROOT'] = PORTAGE_CONFIGROOT
|
||||||
os.environ['EIX_CACHEFILE'] = EIX_CACHEFILE
|
os.environ['EIX_CACHEFILE'] = EIX_CACHEFILE
|
||||||
|
os.environ['http_proxy'] = '127.0.0.1:8123'
|
||||||
|
@ -8,7 +8,7 @@ urlpatterns = patterns('',
|
|||||||
url(r'^', include('djeuscan.urls')),
|
url(r'^', include('djeuscan.urls')),
|
||||||
|
|
||||||
url(r'^admin/', include(admin.site.urls)),
|
url(r'^admin/', include(admin.site.urls)),
|
||||||
url(r'^accounts/', include('captcha.backends.default.urls')),
|
url(r'^accounts/', include('euscanwww.captcha.urls')),
|
||||||
url(r'^accounts/', include('registration.backends.default.urls')),
|
url(r'^accounts/', include('registration.backends.default.urls')),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user