Registering additional types
See original GitHub issueCurrently, only built in model field types are supported.
If you try to use alternative field types (such as currency fields provided by https://github.com/django-money/django-money), they cause this error:
web_1 | File "/usr/local/lib/python3.5/site-packages/graphene_django/converter.py", line 58, in convert_django_field
web_1 | (field, field.__class__))
web_1 | Exception: Don't know how to convert the Django field renting.RenterProfile.phone_number (<class 'phonenumber_field.modelfields.PhoneNumberField'>)
There should probably be some API exposed to register conversions for additional field types. (Or if this is already possible, explain it in the docs.)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:15
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Adding Registration Types - Cvent Community
1 Access the Registration Types page. Begin by selecting your event. From the left-hand navigation, click General, then Registration Types.
Read more >Additional Title Types | Georgia Department of Revenue
Additional Title Types · Expiration, Registration, and Mailing · Dealer Registration · Manufacturer or Distributor Registration · Transporter Registration · Side ...
Read more >Add Registration Types - Blackbaud
Registration types are ways to group registration options. On the Event registration types page, you can add a registration type, create a unique...
Read more >Add Advanced Registration Type - GrowthZone
The advanced registration type allows you to bundle multiple items together for the registration ... Click Add Advanced Registration Types.
Read more >Registration vehicle types - New York DMV
You must register any vehicle owned by you or your business at a DMV office. See specific requirements for different vehicle types below....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@reinierpd I was getting this error and as a workaround I had to import my schema only after registering my CustomField converter.
If I put this line
import cookbook.schema
in the imports section the will raise the error again.I think I found a solution registering the custom field in
schema.py
immediately below the last import. F.i. if you need to registerCustomField
in the cookbook example you should have something like this:It seems working, but since there’s no documentation about this it could be terribly wrong.