0
Yes, if course you can. Filters are just functions that can be imported. Import the filter function you need from django.template.defaultfilters and pass your arguments to it.
10
You can wrap your custom templatetag with ‘filter’ templatetag:
{% filter date %}
{% your_custom_tag %}
{% endfilter %}
More information here: https://docs.djangoproject.com/en/dev/ref/templates/builtins/#filter
- [Django]-DRF APIView – How can I add help text to auto generated form?
- [Django]-Django: need help with keeping apps from depending on one another
- [Django]-Using mongoengine with models.ImageField
Source:stackexchange.com