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

CountryFieldMixin: support name_only #414

Open
akhayyat opened this issue Jan 24, 2023 · 1 comment
Open

CountryFieldMixin: support name_only #414

akhayyat opened this issue Jan 24, 2023 · 1 comment

Comments

@akhayyat
Copy link

akhayyat commented Jan 24, 2023

  1. is there a way to return country names instead of codes when using CountryFieldMixin?
  2. When using a model field with multiple=True, how to get country names instead of codes?

Explicitly declaring the serializer field with name_only=True returns an empty string, and django_countries.serializer_fields.CountryField does not recognize DRF’s many=True option.

@MehdiDRISSIB
Copy link

MehdiDRISSIB commented Dec 21, 2023

Same issue on my side. Any help please ?

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

2 participants