1 2 3 4 5 6 7 8 9 | from django import template
register = template.Library()
@register.filter
#capitalise the first letter of each sentence in a string
def capsentence(value):
value = value.lower()
return ". ".join([sentence.capitalize() for sentence in value.split(". ")])
|
More like this
- Convert String Uppercase and Lowercase by oraculum 2 years, 1 month ago
- db_dump.py - for dumpping and loading data from database by limodou 6 years, 2 months ago
- CategoriesField by fongandrew 3 years, 9 months ago
- truncate letters by trbs 6 years, 2 months ago
- Amazon product-data interface class for Django-friendly PyAWS queries by fish2000 3 years, 3 months ago
Comments