From e76b3cb80d283960d3ca3404dcdff4fbe61a5648 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sun, 28 Jan 2018 20:39:22 +0100 Subject: [PATCH] add a function to get the id of the hidden status --- django/didgeridoo/webshop/views.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/django/didgeridoo/webshop/views.py b/django/didgeridoo/webshop/views.py index 7d4d48e..4c01bab 100644 --- a/django/didgeridoo/webshop/views.py +++ b/django/didgeridoo/webshop/views.py @@ -20,6 +20,12 @@ def get_categories(): {i: Category.objects.filter(parent_category=i.id)}) return category_list + +def get_hidden_status_id(): + hidden_status = ArticleStatus.objects.get(name="hidden") + return hidden_status.id + + category_list = get_categories() return render(request, 'webshop/index.html',