-
Notifications
You must be signed in to change notification settings - Fork 766
Closed
Labels
Description
Hi there!
I try to use the awesome DjangoModelFormMutation but when I add the mutation to the schema I always get this error:
Could not import 'project.config.schema.schema' for Graphene setting 'SCHEMA'. AttributeError: 'NoneType' object has no attribute '_meta'.
Here's my setup:
class Pet(models.Model):
name = models.CharField()
class PetForm(forms.ModelForm):
class Meta:
model = Pet
fields = ('name',)
class PetMutation(DjangoModelFormMutation):
class Meta:
form_class = PetForm
class PetMutations(graphene.ObjectType):
pet = PetMutation.Field(description="Pets!")
class Mutation(PetMutations,
graphene.ObjectType):
pass
schema = graphene.Schema(query=Query, mutation=Mutation)
Any ideas what I might be doing wrong?
Thanks!
Ron