Django humanize outside of template?

Yes you can

Lets say you want to call naturalday in views.py you would do

from django.contrib.humanize.templatetags.humanize import naturalday
natural_day = naturalday(value)

You can refer to the source code here for the signature, and options

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)