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

add CurrencyField for Django Rest Framework #663

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

limonrojo-nm
Copy link

  • Introduces the corresponding DRF Field: CurrencyField
  • modifes register_money_field into register_drf_fields

- Introduces the corresponding DRF Field
- modifes register_money_field into register_drf_fields
Copy link
Contributor

@benjaoming benjaoming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Sorry that the PR has been stuck for so long. I'm one of the maintainers, but I don't use DRF. I believe that there isn't anything problematic here, the former behavior is retained, and only new behavior is added.

It should have a test case, though? The recipe could be to 1) add a new Model with a CurrencyField in tests/testapp.models and 2) add a simple test case to tests/contrib/test_django_rest_framework borrowing from the patterns already implemented..

https://github.com/django-money/django-money/blob/main/tests/testapp/models.py
https://github.com/django-money/django-money/blob/main/tests/contrib/test_django_rest_framework.py

Oh and thanks for the contribution! Unless you beat me to it, I'll add the changelog entry. @Stranger6667 LMK if you have any concerns here.

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

Successfully merging this pull request may close these issues.

None yet

2 participants