Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ISO compliance check for currency #26

Closed
jbieler opened this issue Nov 2, 2017 · 3 comments
Closed

Remove ISO compliance check for currency #26

jbieler opened this issue Nov 2, 2017 · 3 comments

Comments

@jbieler
Copy link

jbieler commented Nov 2, 2017

I really like your library so far. Thank you for writing it!

There is however one problem, as I'm working with cryptocurrencies, that are not always compliant to the ISO currency standard. Can you remove the ISO check when creating currencies? Or can you make it configurable to be able to switch it off?

@carlospalol
Copy link
Owner

Thank you! I think it would be a good idea to let it optionally be non-ISO 4217. I will look into it.

@JamesMcGuigan
Copy link

JamesMcGuigan commented Jan 1, 2018

As a temporary workaround fix, this will allow 3-4 letter currency including DOGE and MOON

requirements.sh

if [[ ! -d ./venv ]]; then
    python3 -m venv venv
fi
source venv/bin/activate
pip-compile
pip-sync
sed -i 's/^REGEX_CURRENCY_CODE = .*/REGEX_CURRENCY_CODE = re.compile("^[A-Z]{3,4}$")/' venv/lib/python*/site-packages/money/money.py

@jbieler
Copy link
Author

jbieler commented Jan 1, 2018

Thanks for the answer! We also have found a similar fix to alter the reflex. As this is not an issue for me anymore, I’ll close the ticket.

@jbieler jbieler closed this as completed Jan 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants