[Python Django] Template에서 연산 사용하기 django-mathfilters
Install terminal 창에 입력, django-mathfilters를 설치 pip install django-mathfilters Add 1. Settings.py 파일에 'mathfilters' 추가 INSTALLED_APPS = [ . . 'mathfilters', . . ] 2. 사용할 template에 {% load mathfilters %} 추가 {% load mathfilters %} Usage sub – subtraction mul – multiplication div – division intdiv – integer (floor) division abs – absolute value mod – modulo addition – replacement for the add filter ..
2022.04.11