Make the first letter uppercase inside a django template

Mayank picture Mayank · Jan 10, 2013 · Viewed 73.9k times · Source

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.

Answer

Aamir Adnan picture Aamir Adnan · Jan 10, 2013

Using Django built-in template filter called title

{{ "myname"|title }}