added history page

This commit is contained in:
vabene1111
2020-05-11 12:59:54 +02:00
parent 5ad27c015e
commit f6aa50bbfc
6 changed files with 66 additions and 4 deletions

View File

@ -106,3 +106,21 @@ class RecipeImportTable(tables.Table):
model = RecipeImport
template_name = 'generic/table_template.html'
fields = ('id', 'name', 'file_path')
class ViewLogTable(tables.Table):
recipe = tables.LinkColumn('view_recipe', args=[A('recipe_id')])
class Meta:
model = ViewLog
template_name = 'generic/table_template.html'
fields = ('recipe', 'created_at')
class CookLogTable(tables.Table):
recipe = tables.LinkColumn('view_recipe', args=[A('recipe_id')])
class Meta:
model = CookLog
template_name = 'generic/table_template.html'
fields = ('recipe', 'rating', 'serving', 'created_at')