Monday, 15 July 2013

python - Django humanize outside of template? -


I know that I can use the human module to change the date / time in a multiline format. I was wondering if I could convert those things into one thoughts / function (meaning outside of the DNS template).

yes you can

you say that you natural Days to view.py call

  import Django.contrib.humanize.templatetags.humanize natural day natural_day = natural day (value)   

You can refer to the signature, and the options

No comments:

Post a Comment