Skip to content
Browse files

math captcha to contact form

  • Loading branch information...
1 parent 87a1cfe commit f64a93e8f3a40bdd517950907d42d97b9ff46b45 @justquick committed Feb 10, 2010
Showing with 10 additions and 5 deletions.
  1. +2 −4 settings.py
  2. +1 −0 setup/requirements.txt
  3. +7 −1 urls.py
View
6 settings.py
@@ -3,15 +3,13 @@
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
-DEBUG = 0
+DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
- ('Webmaster', 'justquick@gmail.com'),
)
MANAGERS = (
- ('Lily', 'effervescent.collective@gmail.com'),
)
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
@@ -37,7 +35,7 @@
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
-USE_I18N = True
+USE_I18N = False
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
View
1 setup/requirements.txt
@@ -13,6 +13,7 @@
-e svn+http://django-template-utils.googlecode.com/svn/trunk/#egg=template_utils
-e git+http://github.com/justquick/django-frontendadmin.git#egg=frontendadmin
-e git+http://opensource.washingtontimes.com/git/public/django-categories.git/#egg=categories
+-e git+http://github.com/justquick/django-math-captcha.git#egg=math_captcha
simplejson==2.0.9
python-memcached==1.44
View
8 urls.py
@@ -36,6 +36,11 @@ def item_pubdate(self, obj):
'Members': GenericSitemap({'queryset':StaffMember.objects.all()})
}
+from contact_form.forms import ContactForm
+from math_captcha.forms import MathCaptchaForm
+
+class CaptchaContactForm(ContactForm,MathCaptchaForm):
+ pass
urlpatterns = patterns('',
(r'^cache/', include('django_memcached.urls')),
@@ -46,7 +51,8 @@ def item_pubdate(self, obj):
url(r'^terminal/', 'terminal.views.terminal', name='terminal'),
(r'^comments/', include('mptt_comments.urls')),
(r'^bio/', include('staff.urls')),
- (r'^contact/', include('contact_form.urls')),
+ url(r'^contact/$','contact_form.views.contact_form',{'form_class':CaptchaContactForm},name='contact_form'),
+ url(r'^contact/sent/$','django.views.generic.simple.direct_to_template',{ 'template': 'contact_form/contact_form_sent.html' },name='contact_form_sent'),
url(r'^feeds/blog/$', 'django_ext.views.feed', {
'items': Post.objects.published().order_by('-publish')[:10],
'title': 'Recent blog entries',

0 comments on commit f64a93e

Please sign in to comment.
Something went wrong with that request. Please try again.