currency codes in own function

This commit is contained in:
matmair committed 2021-07-01 10:32:07 +02:00
1 parent 3c6c9c59d6
commit 66c1e9c97d
2 files changed
+27 -6

No files matched your search

+9
View File
@@ -6,6 +6,7 @@ User-configurable settings for the common app
from __future__ import unicode_literals
from moneyed import CURRENCIES
from django.conf import settings
import common.models
@@ -23,6 +24,14 @@ def currency_code_default():
return code
def currency_codes():
"""
Returns the current currency choices
"""
return [(a, a) for a in settings.CURRENCIES]
def stock_expiry_enabled():
"""
Returns True if the stock expiry feature is enabled