How do I make Django's DATETIME_FORMAT active?

前端 未结 4 1235
春和景丽
春和景丽 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:03

    As Ciro Santilli told, localization format overrides DATETIME_FORMAT in settings when USE_L10N = True. But you can still override DATETIME_FORMAT and other date/time formats by creating custom format files as described in Django documentation.

    See detailed answer here.

提交回复
热议问题