File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ def description(self):
70
70
71
71
72
72
def generate_enum_name (django_model_meta , field ):
73
- if graphene_settings .CHOICES_TO_ENUM_V3_NAMING is True :
73
+ if graphene_settings .DJANGO_CHOICE_FIELD_ENUM_V3_NAMING is True :
74
74
name = "DjangoModel{app_label}{object_name}{field_name}Choices" .format (
75
75
app_label = to_camel_case (django_model_meta .app_label .title ()),
76
76
object_name = django_model_meta .object_name ,
Original file line number Diff line number Diff line change 37
37
"RELAY_CONNECTION_MAX_LIMIT" : 100 ,
38
38
"CAMELCASE_ERRORS" : False ,
39
39
# Set to True to enable v3 naming convention for choice field Enum's
40
- "CHOICES_TO_ENUM_V3_NAMING " : False ,
40
+ "DJANGO_CHOICE_FIELD_ENUM_V3_NAMING " : False ,
41
41
}
42
42
43
43
if settings .DEBUG :
Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ def test_should_postgres_range_convert_list():
335
335
336
336
def test_generate_enum_name ():
337
337
MockDjangoModelMeta = namedtuple ("DjangoMeta" , ["app_label" , "object_name" ])
338
- graphene_settings .CHOICES_TO_ENUM_V3_NAMING = True
338
+ graphene_settings .DJANGO_CHOICE_FIELD_ENUM_V3_NAMING = True
339
339
340
340
# Simple case
341
341
field = graphene .Field (graphene .String , name = "type" )
@@ -352,4 +352,4 @@ def test_generate_enum_name():
352
352
== "DjangoModelSomeLongAppNameSomeObjectFizzBuzzChoices"
353
353
)
354
354
355
- graphene_settings .CHOICES_TO_ENUM_V3_NAMING = False
355
+ graphene_settings .DJANGO_CHOICE_FIELD_ENUM_V3_NAMING = False
Original file line number Diff line number Diff line change @@ -496,7 +496,7 @@ class Query(ObjectType):
496
496
)
497
497
498
498
def test_django_objecttype_convert_choices_enum_naming_collisions (self , PetModel ):
499
- graphene_settings .CHOICES_TO_ENUM_V3_NAMING = True
499
+ graphene_settings .DJANGO_CHOICE_FIELD_ENUM_V3_NAMING = True
500
500
501
501
class PetModelKind (DjangoObjectType ):
502
502
class Meta :
@@ -529,7 +529,7 @@ class Query(ObjectType):
529
529
}
530
530
"""
531
531
)
532
- graphene_settings .CHOICES_TO_ENUM_V3_NAMING = False
532
+ graphene_settings .DJANGO_CHOICE_FIELD_ENUM_V3_NAMING = False
533
533
534
534
def test_django_objecttype_choices_override_enum (self , PetModel ):
535
535
def convert_choice (model , field_name , ** kwargs ):
You can’t perform that action at this time.
0 commit comments