推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
pyshu
V2EX  ›  Python

求 django-xadmin 时间格式设置的方法?

  •  
  •   pyshu · Mar 30, 2018 · 2358 views
    This topic created in 2991 days ago, the information mentioned may be changed or developed.
    我现在的 django-xadmin 的时间默认格式是 “ 2018 年 3 月 29 日 00:10 ”,但是我需要 “ 2018 年 3 月 29 日 00:10:xx ”,要加上秒。。。
    找了好久就是没找到,功力不够,哪个大神能指导下呢?
    2 replies    2018-03-30 14:16:33 +08:00
    xpresslink
        1
    xpresslink  
       Mar 30, 2018
    在 settings 里加上
    # 配置自定义的日期时间格式
    DATETIME_FORMAT = 'Y-m-d H:i:s'
    DATE_FORMAT = 'Y-m-d'
    pyshu
        2
    pyshu  
    OP
       Mar 30, 2018
    @xpresslink 非常感谢大佬,我的问题已成功解决。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2755 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 00:03 · PVG 08:03 · LAX 17:03 · JFK 20:03
    ♥ Do have faith in what you're doing.