mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-05-01 14:33:46 +03:00
Updated docs
This commit is contained in:
parent
b1948d70bd
commit
be22f1639b
|
@ -2,6 +2,7 @@ Integration with Django forms
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
Graphene-Django comes with mutation classes that will convert the fields on Django forms into inputs on a mutation.
|
Graphene-Django comes with mutation classes that will convert the fields on Django forms into inputs on a mutation.
|
||||||
|
*Note: the API is experimental and will likely change in the future.*
|
||||||
|
|
||||||
FormMutation
|
FormMutation
|
||||||
------------
|
------------
|
||||||
|
@ -37,7 +38,7 @@ ModelFormMutation
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Pet
|
model = Pet
|
||||||
|
|
||||||
class PetMutation(ModelFormMutation):
|
class PetMutation(DjangoModelFormMutation):
|
||||||
class Meta:
|
class Meta:
|
||||||
form_class = PetForm
|
form_class = PetForm
|
||||||
|
|
||||||
|
@ -49,7 +50,7 @@ You can change the input name (default is ``input``) and the return field name (
|
||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
class PetMutation(ModelFormMutation):
|
class PetMutation(DjangoModelFormMutation):
|
||||||
class Meta:
|
class Meta:
|
||||||
form_class = PetForm
|
form_class = PetForm
|
||||||
input_field_name = 'data'
|
input_field_name = 'data'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user