Sphene Community Tools

Community

Copyright © 2007-2018 by Herbert Poul

You are not logged in.
Login
Register

Change Language:



AddThis Social Bookmark Button

A Django site.

Powered by Sphene Community Tools

Captcha

Captcha

Back to Snip <-- Previous Change | Next Change -->

Diff Summary
Title
Date 2008-06-14 11:11:10 2008-06-14 23:21:16
Editor Herbert Poul Leeland
Tags

2008-06-14 11:11:10 by Herbert Poul
2008-06-14 23:21:16 by Leeland
17- Add the parent directory of djaptcha to your pyt17- Add the parent directory of djaptcha to your pyt
>hon library path (e.g. by using sys.path.append(..>hon library path (e.g. by using sys.path.append(..
>.) in your settings.py>.) in your settings.py
18- Add 'djaptcha' to your INSTALLED_APPS setting.18- Add 'djaptcha' to your INSTALLED_APPS setting.
19- additional settings variables:19- additional settings variables:
20    - FONT_PATH = '/usr/share/fonts/ttf-bitstream-20    - FONT_PATH = '/usr/share/fonts/ttf-bitstream-
>vera/\VeraBd.ttf'>vera/\VeraBd.ttf'
21    - FONT_SIZE = 1621    - FONT_SIZE = 16
n22- optional settings: n22- optional settings (showing default settings):
23    - CAPTCHA_BGCOLOR, CAPTCHA_FGCOLOR: defines op23    - CAPTCHA_BGCOLOR = (39, 36, 81)  # background
>tionally the background and foreground color of th> color for captcha images
>e captcha  
24    - CAPTCHA_FGCOLOR = (153, 204, 0) # foreground
 > color for captcha images
24    - CAPTCHA_BORDER: the border in pixels around 25    - CAPTCHA_BORDER = 2 # border width in pixels 
>the text>around captcha text
25- Make sure that in your project's urlconf is an e26- Make sure that in your project's urlconf is an e
>ntry like: (r'^community/', include('sphene.commun>ntry like: (r'^community/', include('sphene.commun
>ity.urls'), defaultdict),>ity.urls'), defaultdict),
t26 t
2727
2828
29## Done29## Done
3030
31This should be all that is to do. Now when an anon31This should be all that is to do. Now when an anon
>ymous user wants to reply to a thread he should be>ymous user wants to reply to a thread he should be
> required to enter a valid captcha.> required to enter a valid captcha.


Powered by Sphene Community Tools