OGapp Development OGapp Development - 11 months ago 37
HTML Question

How can I display on html (Django project), value of date filed but, the month 3 letters

on my HTML file I have a value of a date filed like this :

<div> {{ offer.expiry_time }} </div>

the output on the page is:
June ,15,2016

June for example has 4 letters but I need only the 3 first letters.

It should look like:


You can pass arguments to the date filter:

{{ offer.expiry_time:"b,j,Y" }}

You can see the definitions of each of those letters in the documentation linked above.