Is there any filter in Django that can remove underscores and also capitalize each letter of the word OR remove underscores and capitalize the first letter of sentence?
@register.filter()
def field_name_to_label(value):
value = value.replace('_', ' ')
return value.title()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With