{ "info": { "author": "Adrian Matellanes", "author_email": "matellanesadrian@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Utilities" ], "description": "django-numfilters\n=================\n\n.. image:: https://travis-ci.org/amatellanes/django-numfilters.svg?branch=master\n :target: https://travis-ci.org/amatellanes/django-numfilters\n\n\n.. image:: https://coveralls.io/repos/amatellanes/django-numfilters/badge.png?branch=master\n :target: https://coveralls.io/r/amatellanes/django-numfilters?branch=master\n\n.. image:: https://pypip.in/v/django-numfilters/badge.png\n :target: https://crate.io/packages/django-numfilters/\n :alt: Pypi version\n\n.. image:: https://pypip.in/d/django-numfilters/badge.png\n :target: https://crate.io/packages/django-numfilters/\n :alt: Pypi downloads\n\n\n**django-numfilters** is a collection of template filters for Django who provides access to several basic mathematical functions.\n\nDownload\n--------\n\nTo install it by using `pip`_: ::\n\n $ pip install django-numfilters\n\nor by using `easy_install`_: ::\n \n $ easy_install django-numfilters\n \nYou can also pot for installing it from source: ::\n \n $ git clone git@github.com:amatellanes/django-numfilters.git\n $ cd django-numfilters\n $ python setup.py install\n\n.. _pip: https://pypi.python.org/pypi/pip\n.. _easy_install: https://pypi.python.org/pypi/setuptools\n\nInstallation\n------------\n\nTo enable **django-numfilters** in your Django project, you need to add `django_numfilters` to `INSTALLED_APPS`: ::\n\n INSTALLED_APPS = (\n ...\n 'django_numfilters',\n ...\n )\n\nUsage\n-----\n\nThis section provides a summary of **django-numfilters** features.\n\nFirstly, you need make filters available to your templates using `{% load numfilters %}` tag. After this, you can use \nnext tags:\n\n`abs`\n Returns the absolute value of `a`, for `a` number.\n \n`add`\n This filter is provided by `Django`_.\n\n`sub`\n Returns `a - b`, for `a` and `b` numbers.\n \n`mul`\n Returns `a * b`, for `a` and `b` numbers.\n \n`div`\n Returns `a / b`, for `a` and `b` numbers (*classic* division).\n \n`mod`\n Returns `a % b`, for `a` and `b` numbers.\n \n`floordiv`\n Returns `a // b`, for `a` and `b` numbers.\n \n`pow`\n Returns `a ** b`, for `a` and `b` numbers. \n \n`sqrt`\n Return the square root of `a`, for `a` number.\n \n.. _Django: https://docs.djangoproject.com/en/dev/ref/templates/builtins/#add\n \n**Example**\n\n.. sourcecode:: html\n\n {% load numfilters %}\n \n \n
\n \n