[Fixed]-Want to display the first character of word in django templates

37👍

Solution with using templates tags(but for me the answer from @Kasra more preferable):

First letter:

{{ postone.user|make_list|first }}

Word without first:

{{ postone.user|make_list|slice:'1:'|join:'' }}

26👍

try
<p>{{ postone.user.first_name.0 }}</p>

👤Zac

Leave a comment