Remove duplicate date_within
template tag
This commit is contained in:
parent
283bb5d330
commit
fe4112c879
2 changed files with 0 additions and 11 deletions
|
@ -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)))
|
Loading…
Reference in a new issue