Hi, hoping you can help with a query - I am trying to use the following date format specification to render my dates in a shorter format on my index.html template for UX purposes:
{{ article.created_on|date:"D M Y"}}
I try many different variations of the formatting, but the HTML template render of the date will not change from its current format (e.g. MARCH 24, 2022, 12:39PM)
My Model code (date field extract) is per below:
class Article(models.Model):
created_on = models.DateTimeField(auto_now_add=True)
My View code is per below:
class ArticleList(generic.ListView):
model = Article
queryset = Article.objects.filter(status=1).order_by('-created_on')
template_name = 'index.html'
paginate_by = 6
And my HTML template extract is per below:
<p class="author">
{{ article.created_on|date:"D M Y"}}
</p>
I have tried disabling the L10N variable in settings.py, and setting it to False, but the rendered date still will not change format.
Any help you can provide would be much appreciated - thanks in advance: