graphene-django/examples/cookbook-plain/cookbook/recipes/admin.py
2017-02-14 20:23:45 +02:00

13 lines
279 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]