--- a/sdi/forms.py Sat Jun 05 17:01:56 2010 +0530
+++ b/sdi/forms.py Sat Jun 05 17:18:10 2010 +0530
@@ -1,6 +1,7 @@
from django import forms
from sage_days.sdi.models import Registrant, TOPICS_CHOICES
+from captcha.fields import CaptchaField
class RegisterForm(forms.ModelForm):
""" The form that is displayed to user.
@@ -9,6 +10,7 @@
topics_interested = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple, choices=TOPICS_CHOICES, required=False)
class Meta:
model = Registrant
+ captcha = CaptchaField()
def clean_email(self):
""" See if the user has already registered using the email.
--- a/settings.py Sat Jun 05 17:01:56 2010 +0530
+++ b/settings.py Sat Jun 05 17:18:10 2010 +0530
@@ -1,6 +1,6 @@
# Django settings for sage_days project.
-DEBUG = False
+DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (('Anoop Jacob Thomas','anoop@fossee.in')
@@ -79,6 +79,7 @@
'django.contrib.sites',
'django.contrib.admin',
'sage_days.sdi',
+ 'captcha',
)
APACHE_URL_PREFIX = "sage_days"
--- a/urls.py Sat Jun 05 17:01:56 2010 +0530
+++ b/urls.py Sat Jun 05 17:18:10 2010 +0530
@@ -24,4 +24,5 @@
(r'^contact/',contact),
(r'^about/',about),
(r'^registration/', include('sage_days.sdi.site.urls')),
+ (r'^captcha/', include('captcha.urls')),
)