开发者

Django template timesince filter - limit

开发者 https://www.devze.com 2023-01-05 11:23 出处:网络
Is it possible to lim开发者_运维技巧it django timesince filter say to 7 days. If date is more than 7 days, don\'t apply the filterThe source for timesince is located under django/django/utils/timesinc

Is it possible to lim开发者_运维技巧it django timesince filter say to 7 days. If date is more than 7 days, don't apply the filter


The source for timesince is located under django/django/utils/timesince.py. It's short and should require no great effort, to modify it to accept another argument, if some time (e.g. 7 days) is exceeded.

0

精彩评论

暂无评论...
验证码 换一张
取 消