From 8c6019756f3e825c03512ffd64813013c33a70f9 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Fri, 9 Feb 2018 17:04:54 +0100 Subject: [PATCH] a little more responsive --- cookbook/tables.py | 7 +++- cookbook/templates/base.html | 3 ++ .../templates/generic/table_template.html | 4 +-- cookbook/templates/index.html | 32 +++++++++++-------- cookbook/templates/test.html | 24 ++++++++++++++ cookbook/urls.py | 2 ++ cookbook/views/views.py | 4 +++ 7 files changed, 60 insertions(+), 16 deletions(-) create mode 100644 cookbook/templates/test.html diff --git a/cookbook/tables.py b/cookbook/tables.py index fc5ecaf25..0e66117ba 100644 --- a/cookbook/tables.py +++ b/cookbook/tables.py @@ -6,7 +6,12 @@ from .models import * class RecipeTable(tables.Table): id = tables.LinkColumn('edit_recipe', args=[A('id')]) - name = tables.TemplateColumn("{{record.name}}") + name = tables.TemplateColumn( + "{{record.name}}") + category = tables.Column( + attrs={'td': {'class': 'd-none d-lg-table-cell'}, 'th': {'class': 'd-none d-lg-table-cell'}}) + all_tags = tables.Column( + attrs={'td': {'class': 'd-none d-lg-table-cell'}, 'th': {'class': 'd-none d-lg-table-cell'}}) class Meta: model = Recipe diff --git a/cookbook/templates/base.html b/cookbook/templates/base.html index d7b17b28c..073fcaa3e 100644 --- a/cookbook/templates/base.html +++ b/cookbook/templates/base.html @@ -17,6 +17,9 @@ integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"> +