Created
December 19, 2015 18:20
-
-
Save dodolboks/07dd1e51c8fe8134a5f5 to your computer and use it in GitHub Desktop.
Custom django template to replace title filters. this filter used in production on https://kelaskita.com Kelas Belajar Online
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import template | |
register = template.Library() | |
@register.filter | |
def titlefirst(value): | |
import re | |
s = re.sub("(^|\s)(\S)", repl_func, value) | |
return s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment