mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-22 17:46:57 +03:00
Add support for GenericIPAddressField
This commit is contained in:
parent
90889ca455
commit
6c0bc4c545
|
@ -25,6 +25,7 @@ def convert_django_field(field):
|
|||
@convert_django_field.register(models.EmailField)
|
||||
@convert_django_field.register(models.SlugField)
|
||||
@convert_django_field.register(models.URLField)
|
||||
@convert_django_field.register(models.GenericIPAddressField)
|
||||
@convert_django_field.register(UUIDField)
|
||||
def convert_field_to_string(field):
|
||||
return String(description=field.help_text)
|
||||
|
|
|
@ -48,6 +48,10 @@ def test_should_url_convert_string():
|
|||
assert_conversion(models.URLField, graphene.String)
|
||||
|
||||
|
||||
def test_should_ipaddress_convert_string():
|
||||
assert_conversion(models.GenericIPAddressField, graphene.String)
|
||||
|
||||
|
||||
def test_should_auto_convert_id():
|
||||
assert_conversion(models.AutoField, graphene.ID)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user