flask-humanize
flask-humanize copied to clipboard
Make conda package
Just for reference for anyone looking to use this package with conda - You can use the humanize package directly, which is on conda-forge: https://pypi.org/project/humanize/
I registered filters like this:
import humanize
@app.template_filter()
def naturalday(v):
return humanize.naturalday(v)
@app.template_filter()
def naturaltime(v):
return humanize.naturaltime(v)
Then you can use them in the template like this: {{ mydate | naturalday }}