[Answered ]-Django – extend date template filter

2πŸ‘

βœ…

From the docs

The format passed can be one of the predefined ones DATE_FORMAT, DATETIME_FORMAT, SHORT_DATE_FORMAT or SHORT_DATETIME_FORMAT, or a custom format that uses the format specifiers shown in the table above. Note that predefined formats may vary depending on the current locale.

So feel free to set any of them in the settings

DATETIME_FORMAT = 'D d F Y H:i'

{{ my_date|date:"DATETIME_FORMAT" }}
πŸ‘€Sayse

Leave a comment