开发者

How can I override Django filter

I want to override timesin开发者_如何学JAVAce Django's template filter for creating a more efficient filter for getting relative times.

How can I do it?


You can also create your own filter to do what you want: http://docs.djangoproject.com/en/dev/howto/custom-template-tags/


Monkeypatch django.utils.timesince.timesince with your desired function.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜