小编upo*_*que的帖子

如何防止Django自动转换日期时间

日期时间值,例如day = "2017-9-2 00:00:00"

在模板中使用时,

index.html

...

{{day}} 
...  
Run Code Online (Sandbox Code Playgroud)

Django自动将其转换为Sept. 2, 2017, midnight

如何禁用此行为?

我希望它以其原始格式显示"2017-9-2 00:00:00"

django django-templates python-datetime

1
推荐指数
1
解决办法
637
查看次数

标签 统计

django ×1

django-templates ×1

python-datetime ×1