Files
django-cookAssistant/recipe_book/admin.py
Arthur 2e7553b70c init
2019-04-20 15:15:32 +02:00

14 lines
381 B
Python

from django.contrib import admin
from .models import Recipe,IngredientWithAmount, Ingredient
# Register your models here.
class IngredientWithAmountInline(admin.TabularInline):
model=IngredientWithAmount
class RecipeAdmin(admin.ModelAdmin):
inlines = [ IngredientWithAmountInline, ]
admin.site.register(Recipe, RecipeAdmin)
admin.site.register(Ingredient)