Skip to main content

Django Num2Fa

PyPI releases License

django-num2fa is a wrapper around num2fa package which provides a set of filters to convert numbers to Persian numbers and words.

Installation

pip install -U django-num2fa

That's it!

Usage

First, add django_num2fa inside your INSTALLED_APPS:

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django_num2fa',
    # other packages
]

load num2fa inside your template:

{% load num2fa %}

then, wherever you have a number in your code template, pipe it with one of the fa_numbers, fa_words, and fa_ordinal_words template filters.

{% load num2fa %}

{{ number | fa_numbers }}
{{ number | fa_words }}
{{ number | fa_ordinal_words }}

Contributing

We welcome contributions! To learn how you can contribute, please check the Contributing document.

License

This work is licensed under the terms of the GNU Affero General Public License (AGPL).

Release files for django-num2fa 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-num2fa 1.0.3
File Size Uploaded
django-num2fa-1.0.3.tar.gz 15.8 kB Details

Release files / django-num2fa-1.0.3.tar.gz

Download URL django-num2fa-1.0.3.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
614a1f700e0787a0a80593d422705f1fe3f4785f1b3e94606a0cd534e37f64d6
BLAKE2b-256 checksum
How to use checksums
15853b3f99ef37b5bf2feb205dac30ace21b993f990cd07e4f4b44d499a365e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.0.3 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page