diff --git a/cookbook/tables.py b/cookbook/tables.py index b9ace14b..1ee7b941 100644 --- a/cookbook/tables.py +++ b/cookbook/tables.py @@ -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') diff --git a/cookbook/templates/base.html b/cookbook/templates/base.html index 945d50fc..f499e9f1 100644 --- a/cookbook/templates/base.html +++ b/cookbook/templates/base.html @@ -128,7 +128,7 @@