How do I make Django's DATETIME_FORMAT active?

前端 未结 4 2038
渐次进展
渐次进展 2021-02-13 23:49

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-13 23:56

    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

提交回复
热议问题