Skip to content

Commit 10d2f3e

Browse files
committed
Commented the input form class, for now
1 parent 364d4f8 commit 10d2f3e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

graphene_django/forms/mutation.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
# from django import forms
12
from collections import OrderedDict
23

34
import graphene
45
from graphene import Field, InputField
56
from graphene.relay.mutation import ClientIDMutation
67
from graphene.types.mutation import MutationOptions
8+
# from graphene.types.inputobjecttype import (
9+
# InputObjectTypeOptions,
10+
# InputObjectType,
11+
# )
712
from graphene.types.utils import yank_fields_from_attrs
813
from graphene_django.registry import get_global_registry
914

@@ -62,6 +67,28 @@ def get_form_kwargs(cls, root, info, **input):
6267
return kwargs
6368

6469

70+
# class DjangoFormInputObjectTypeOptions(InputObjectTypeOptions):
71+
# form_class = None
72+
73+
74+
# class DjangoFormInputObjectType(InputObjectType):
75+
# class Meta:
76+
# abstract = True
77+
78+
# @classmethod
79+
# def __init_subclass_with_meta__(cls, form_class=None,
80+
# only_fields=(), exclude_fields=(), _meta=None, **options):
81+
# if not _meta:
82+
# _meta = DjangoFormInputObjectTypeOptions(cls)
83+
# assert isinstance(form_class, forms.Form), (
84+
# 'form_class must be an instance of django.forms.Form'
85+
# )
86+
# _meta.form_class = form_class
87+
# form = form_class()
88+
# fields = fields_for_form(form, only_fields, exclude_fields)
89+
# super(DjangoFormInputObjectType, cls).__init_subclass_with_meta__(_meta=_meta, fields=fields, **options)
90+
91+
6592
class DjangoFormMutationOptions(MutationOptions):
6693
form_class = None
6794

0 commit comments

Comments
 (0)