Django Admin: Changing display format of a date field

Asked

Viewed 578 times

2

In the Admin, my application shows the date in full 19 de January de 2017 in changed_listview. How do I show the date in the form DD/MM/AAAA?

1 answer

2

One way to do this would be by using the following in your settings.py:

from django.conf.locale.pt_BR import formats as br_formats
br_formats.DATE_FORMAT = 'd/m/Y'

It is inside this file that you will find how to format the date formats. To later get better, take a look at the code in this link.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.