From c32056d3c8de56202324b42bddf4677c36de97db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Wed, 7 Dec 2022 15:54:32 -0300 Subject: [PATCH] Datas e horas em formato curto no admin --- sigi/settings.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sigi/settings.py b/sigi/settings.py index 6ae9557..fea6d31 100644 --- a/sigi/settings.py +++ b/sigi/settings.py @@ -13,6 +13,8 @@ https://docs.djangoproject.com/en/4.0/ref/settings/ import environ from pathlib import Path from django.utils.translation import gettext_lazy as _ +from django.conf.locale.pt_BR import formats as br_formats + # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent @@ -222,6 +224,10 @@ DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" IMPORT_EXPORT_USE_TRANSACTIONS = True IMPORT_EXPORT_SKIP_ADMIN_LOG = True +# Admin date and time short formats for pt_BR +br_formats.DATE_FORMAT = br_formats.SHORT_DATE_FORMAT +br_formats.DATETIME_FORMAT = br_formats.SHORT_DATETIME_FORMAT + # Django Material Admin settings # https://github.com/MaistrenkoAnton/django-material-admin#django-material-administration