0👍
✅
This cannot be done in Django templates as of this writing without writing a custom template tag in Python.
12👍
You can create your own template tag:
import datetime
from django import template
register = template.Library()
@register.filter
def plus_days(value, days):
return value + datetime.timedelta(days=days)
- [Django]-Access Django App on AWS ec2 host
- [Django]-Deleting the tags that are not used by any other object
- [Django]-Django ping google http error
- [Django]-Force reload on client's webpage Django
- [Django]-How use python-docx to stream a file from template
Source:stackexchange.com