How do I make Django's DATETIME_FORMAT active?

前端 未结 4 1239
春和景丽
春和景丽 2021-02-13 23:27

Where should DATETIME_FORMAT be placed for it to have effect on the display of date-time in the Django admin site (Django’s automatic admin interface)?

Documentation for

4条回答
  •  粉色の甜心
    2021-02-14 00:13

    With:

    USE_L10N = False
    

    DATE_TIME takes effect, since the localization of l10n overrides DATETIME_FORMAT and DATE_FORMAT as documented at: https://docs.djangoproject.com/en/1.9/ref/settings/#date-format

提交回复
热议问题