Snippet List
Given a string, it first lowercases it, then uppercases the first letter of each sentence.
Helpful when dealing with awfully formatted entirely UPPERCASE XML product data feeds.
- capitalize
- capitalise
- sentence
- sentences
- capitalises
- capitalizes
- prettifies
- sentance
This is to be used as a template filter. See [django documentation](http://www.djangoproject.com/documentation/templates_python/#writing-custom-template-filters) for adding custom filters.
Example of use:
name = "bart simpson"
`{{ name|cap }}` will convert 'name' to "Bart Simpson"
It works on space-separated names, as well as the following:
* converts "mcfly" to "McFly";
* converts "o'neill" to "O'Neill";
* converts "barker-bradley" to "Barker-Bradley"
- names
- template-filters
- capitalize
2 snippets posted so far.