Merge pull request #45 from drzix/master

Remove an unneeded backup file
This commit is contained in:
Syrus Akbary 2016-11-07 08:20:50 -08:00 committed by GitHub
commit d52471859d

View File

@ -1,33 +0,0 @@
from cookbook.ingredients.models import Recipe, Ingredient
from graphene import AbstractType, Node
from graphene_django.filter import DjangoFilterConnectionField
from graphene_django.types import DjangoObjectType
class RecipeNode(DjangoObjectType):
class Meta:
model = Recipe
interfaces = (Node, )
filter_fields = ['name', 'ingredients']
filter_order_by = ['name']
class RecipeIngredientNode(DjangoObjectType):
class Meta:
model = RecipeIngredient
# Allow for some more advanced filtering here
interfaces = (Node, )
filter_fields = {
'name': ['exact', 'icontains', 'istartswith'],
'notes': ['exact', 'icontains'],
'recipe': ['exact'],
'recipe__name': ['icontains'],
}
filter_order_by = ['name', 'recipe__name',]
class Query(AbstractType):
recipe = Node.Field(RecipeNode)
all_categories = DjangoFilterConnectionField(RecipeNode)
recipeingredient = Node.Field(IngredientNode)
all_recipeingredients = DjangoFilterConnectionField(RecipeIngredientNode)