Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make the first letter uppercase inside a django template

I am pulling a name from a database which is stored as myname. How do I display this inside a Django template as Myname, with the first letter being in uppercase.

like image 468
Mayank Avatar asked Oct 18 '22 08:10

Mayank


1 Answers

Using Django built-in template filter called title

{{ "myname"|title }}
like image 283
Aamir Rind Avatar answered Oct 19 '22 20:10

Aamir Rind