From 78ea59a43028c579283d13d972f3ebc94401ed72 Mon Sep 17 00:00:00 2001 From: Elisha Date: Thu, 22 Jun 2023 20:14:02 +0100 Subject: [PATCH] Added new currency, Nigerian Naira NGN --- docs/installation.rst | 2 +- subscriptions/currency.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/installation.rst b/docs/installation.rst index 3f5284a..ff47a79 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -59,7 +59,7 @@ Add django-flexible-subscriptions to your project urlpatterns = [ ... path('subscriptions/', include('subscriptions.urls')), - path('admin/', include(admin.site.urls), # Optional, but recommended + path('admin/', include(admin.site.urls)), # Optional, but recommended ... ] diff --git a/subscriptions/currency.py b/subscriptions/currency.py index 8b5e623..fcd67d9 100644 --- a/subscriptions/currency.py +++ b/subscriptions/currency.py @@ -78,6 +78,23 @@ 'p_sign_posn': SIGN_PRECEDE_VALUE, 'n_sign_posn': SIGN_PARANTHESES, }, + 'en_ng': { + 'currency_symbol': '₦', + 'int_curr_symbol': 'NGN', + 'p_cs_precedes': True, + 'n_cs_precedes': True, + 'p_sep_by_space': False, + 'n_sep_by_space': False, + 'mon_decimal_point': '.', + 'mon_thousands_sep': ',', + 'mon_grouping': 3, + 'frac_digits': 2, + 'int_frac_digits': 2, + 'positive_sign': '', + 'negative_sign': '-', + 'p_sign_posn': SIGN_PRECEDE_VALUE, + 'n_sign_posn': SIGN_PRECEDE_VALUE, + }, 'fa_ir': { 'currency_symbol': '﷼', 'int_curr_symbol': 'IRR',