-
You have colors in a number of formats (html-style #RRGGBB, rgb-tuples (r, g, b), and PIL-style integers). You want to convert between formats. It’s pretty easy to do, but also pretty easy to forget; hence, this recipe.
-
an easy way to write a Django view which restricts itself to only allowing a specific HTTP method or methods. For example, a web-based API might want to only allow POST to specific views.
things that look better on the internet
links for 2008-05-30
links for 2008-05-15
-
Newforms lets you generate a from from a model, and represents most of the model’s attributes in the form attributes format, except for one very important field: error_messages (or, if it does, is not yet documented). This is how to do it manually.
links for 2008-05-14
-
A quickie clone of good old fashion Formmail.pl any form that is a subclass of FormMail will have its conents emailed to all staff members on the site.
links for 2008-05-08
-
This is the first approach to give admins a nice interface for geographical data. With the included CoordinatesFormField it is possible to add and edit GPS coordinates using one of the popular map services from Google and Yahoo.
