This commit is contained in:
Arthur
2019-04-20 15:15:32 +02:00
parent d8ac11921f
commit 2e7553b70c
46 changed files with 1871 additions and 721 deletions

13
recipe_book/admin.py Normal file
View File

@@ -0,0 +1,13 @@
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)