aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorentin Chary <corentin.chary@gmail.com>2012-10-29 12:46:37 +0100
committerCorentin Chary <corentin.chary@gmail.com>2012-10-29 13:06:05 +0100
commit808acfe13aa299cc0d800c9e9c2e8dec764b8be3 (patch)
tree966526e03ec763df7214011450010544caa9db24
parenteuscanwww: Adding an about config page (diff)
downloadeuscan-808acfe13aa299cc0d800c9e9c2e8dec764b8be3.tar.gz
euscan-808acfe13aa299cc0d800c9e9c2e8dec764b8be3.tar.bz2
euscan-808acfe13aa299cc0d800c9e9c2e8dec764b8be3.zip
django-recaptcha 0.0.5 compat
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
-rw-r--r--euscanwww/djeuscan/processing/scan/scan_upstream.py2
-rw-r--r--euscanwww/euscanwww/captcha/__init__.py6
-rw-r--r--euscanwww/euscanwww/captcha/forms.py5
-rw-r--r--euscanwww/euscanwww/captcha/urls.py12
-rw-r--r--euscanwww/euscanwww/settings.py1
-rw-r--r--euscanwww/euscanwww/urls.py2
6 files changed, 26 insertions, 2 deletions
diff --git a/euscanwww/djeuscan/processing/scan/scan_upstream.py b/euscanwww/djeuscan/processing/scan/scan_upstream.py
index bc9159b..6ec2b76 100644
--- a/euscanwww/djeuscan/processing/scan/scan_upstream.py
+++ b/euscanwww/djeuscan/processing/scan/scan_upstream.py
@@ -34,7 +34,7 @@ class ScanUpstream(object):
"Error while scanning upstream for package %s!",
package
)
- self.logger.debug(
+ self.logger.info(
"Error %s",
out_json
)
diff --git a/euscanwww/euscanwww/captcha/__init__.py b/euscanwww/euscanwww/captcha/__init__.py
new file mode 100644
index 0000000..a6b282a
--- /dev/null
+++ b/euscanwww/euscanwww/captcha/__init__.py
@@ -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
diff --git a/euscanwww/euscanwww/captcha/forms.py b/euscanwww/euscanwww/captcha/forms.py
new file mode 100644
index 0000000..ca4a876
--- /dev/null
+++ b/euscanwww/euscanwww/captcha/forms.py
@@ -0,0 +1,5 @@
+from captcha.fields import ReCaptchaField
+from registration.forms import RegistrationForm
+
+class RegistrationFormCaptcha(RegistrationForm):
+ captcha = ReCaptchaField(attrs={'theme': 'white'})
diff --git a/euscanwww/euscanwww/captcha/urls.py b/euscanwww/euscanwww/captcha/urls.py
new file mode 100644
index 0000000..76cbd2e
--- /dev/null
+++ b/euscanwww/euscanwww/captcha/urls.py
@@ -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'
+ ),
+)
diff --git a/euscanwww/euscanwww/settings.py b/euscanwww/euscanwww/settings.py
index d6b8616..5705c3b 100644
--- a/euscanwww/euscanwww/settings.py
+++ b/euscanwww/euscanwww/settings.py
@@ -267,3 +267,4 @@ except ImportError, ex:
os.environ['ROOT'] = PORTAGE_ROOT
os.environ['PORTAGE_CONFIGROOT'] = PORTAGE_CONFIGROOT
os.environ['EIX_CACHEFILE'] = EIX_CACHEFILE
+os.environ['http_proxy'] = '127.0.0.1:8123'
diff --git a/euscanwww/euscanwww/urls.py b/euscanwww/euscanwww/urls.py
index d6090b5..b104339 100644
--- a/euscanwww/euscanwww/urls.py
+++ b/euscanwww/euscanwww/urls.py
@@ -8,7 +8,7 @@ urlpatterns = patterns('',
url(r'^', include('djeuscan.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')),
)