graphene-django/examples/cookbook/cookbook/recipes/admin.py
2016-11-03 20:59:40 -04:00

11 lines
273 B
Python

from django.contrib import admin
from cookbook.recipes.models import Recipe, RecipeIngredient
class RecipeIngredientInline(admin.TabularInline):
model = RecipeIngredient
@admin.register(Recipe)
class RecipeAdmin(admin.ModelAdmin):
inlines = [RecipeIngredientInline]