Snippet List
Just a simple regex function to convert a camel case string ("ClassName") to a lower case string with underscores ("class_name"). Came across a need for this when I was trying to add properties to a model at runtime using `object.__class__.__name__`. This is a modification of the function "get_verbose_name" found in django.db.models.options.
- utilities
- formatting
- one-liners
Form fields use the dateutil module [http://labix.org/python-dateutil](http://labix.org/python-dateutil) to parse natural-language input for date and datetime fields.
The callback function will replace all date and datetime fields automatically for form_for_model and form_for_instance. **Note**: by replacing the 'form_class' keyword argument instead of just returning the field itself you preserve the 'required' status of the field.
jdriscoll has posted 4 snippets.