{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/10"},{"label":"WWW/HTTP","url":"https://skillfed.io/packages/category/internet-www-http/3"}],"enrichment":{"capability":"Provides Django template filters for basic arithmetic operations\u2014subtraction, multiplication, division, modulo, and absolute value\u2014that Django's built-in template system does not include.","skillfed_tags":["django-template-filters","template-math"],"use_cases":["Display calculated values in Django templates without writing custom template tags\u2014e.g., show discounted prices or percentage calculations.","Perform simple arithmetic on template variables for display purposes, such as dividing totals by counts to show averages.","Handle float and Decimal arithmetic in templates where Django's built-in `add` filter would not suffice.","Reduce boilerplate by avoiding custom template tag definitions for straightforward math operations."],"what_it_does":"django-mathfilters extends Django's template language with arithmetic filters for use in templates. Django provides an `add` filter but omits subtraction, multiplication, division, and other basic math operations; this package fills that gap by offering `sub`, `mul`, `div`, `intdiv`, `abs`, `mod`, and an enhanced `addition` filter that handles float and Decimal types in addition to integers.\n\nThe package is a simple, zero-dependency Django app that you install via pip and register in INSTALLED_APPS. Once loaded in a template with `{% load mathfilters %}`, you can apply arithmetic operations inline\u2014for example, `{{ 13|sub:17 }}` or `{{ answer|mul:0.5 }}`\u2014without writing custom template tags or view logic.","worth_installing":"Yes, if you are on Django 1.11\u20133.x with Python 3.5\u20133.7 and need simple math filters in templates. No, if you are using modern Django or Python versions\u2014the package is abandoned and has not been updated since 2020, so compatibility with current releases is uncertain. Consider writing a custom template tag or moving calculations to your view layer if you need active maintenance."},"id":"django-mathfilters","links":{"html":"https://skillfed.io/packages/django-mathfilters","md":"https://skillfed.io/packages/django-mathfilters.md","pypi":"https://pypi.org/project/django-mathfilters/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2020-02-10","license_spdx":null,"license_treatment":"permissive","name":"django-mathfilters","python_support":"unspecified","summary":"A set of simple math filters for Django"},"popularity":{"monthly_downloads":636814,"position":5621,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.0.0"}
