wip supermarket categories

This commit is contained in:
vabene1111
2021-01-25 21:58:24 +01:00
parent 138a29770a
commit 09716f2b00
7 changed files with 100 additions and 13 deletions

View File

@ -5,7 +5,7 @@ from .models import (Comment, CookLog, Food, Ingredient, InviteLink, Keyword,
RecipeBook, RecipeBookEntry, RecipeImport, ShareLink,
ShoppingList, ShoppingListEntry, ShoppingListRecipe,
Space, Step, Storage, Sync, SyncLog, Unit, UserPreference,
ViewLog, Supermarket, SupermarketCategory)
ViewLog, Supermarket, SupermarketCategory, SupermarketCategoryRelation)
class SpaceAdmin(admin.ModelAdmin):
@ -42,7 +42,16 @@ class SyncAdmin(admin.ModelAdmin):
admin.site.register(Sync, SyncAdmin)
admin.site.register(Supermarket)
class SupermarketCategoryInline(admin.TabularInline):
model = SupermarketCategoryRelation
class SupermarketAdmin(admin.ModelAdmin):
inlines = (SupermarketCategoryInline,)
admin.site.register(Supermarket, SupermarketAdmin)
admin.site.register(SupermarketCategory)