graphene-django/examples/cookbook-plain/cookbook/recipes/admin.py

13 lines
279 B
Python
Raw Permalink Normal View History

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]