Remove duplicate date_within template tag

This commit is contained in:
Ben Sturmfels 2024-03-19 22:20:13 +11:00
parent 283bb5d330
commit fe4112c879
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0
2 changed files with 0 additions and 11 deletions

View file

@ -1,11 +0,0 @@
from datetime import datetime, timedelta
from django import template
register = template.Library()
@register.filter
def date_within_past_days(value, arg):
# question: does datetime.now() do a syscall each time is it called?
return value > (datetime.now() - timedelta(days=int(arg)))