HTML color code field
A CharField (Model) that checks that the value is a valid HTML color code (Hex triplet) like #FFEE00.
- model
- db
- color
- hexcode
A CharField (Model) that checks that the value is a valid HTML color code (Hex triplet) like #FFEE00.
Parse a string for [BBCode](http://en.wikipedia.org/wiki/Bbcode) and generate it to (X)HTML by using the [postmarkup libary](http://code.google.com/p/postmarkup/). In your template for generating (X)HTML: {% load bbcode %} {{ value|bbcode }} In your template for removing BBCode fragments: {% load bbcode %} {{ value|strip_bbcode }}
I use this to integrate a google map in a form renderd by newforms. If someone click on the map and set a icon, the Latitude and Longitude data goes into the 2 form fields. You need to generate a google API key (http://www.google.com/apis/maps/signup.html) for the GOOGLE_KEY variable.
Recaptcha is a free service that helps you protect your forms against spam bots by displaying a picture showing 2 words or playing an audio file telling 8 digits for the visually handicapped. After registration on http://recaptcha.net a private and a public key are generated. Put the keys in settings.py. Find client code for recaptcha at http://pypi.python.org/pypi/recaptcha-client. Put the file captcha.py into application root.
b23 has posted 4 snippets.