From 1075062f166828a08e0f8a9bac1a4fc426549610 Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Fri, 26 Jan 2018 18:32:29 +0300 Subject: [PATCH] =?UTF-8?q?LIL-116.=20=D0=A0=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20=D0=B2=D1=8B=D0=BF=D0=B0=D0=B4?= =?UTF-8?q?=D0=B0=D1=8E=D1=89=D0=B8=D0=B9=20=D1=81=D0=BF=D0=B8=D1=81=D0=BE?= =?UTF-8?q?=D0=BA=20=D0=BA=D1=83=D1=80=D1=81=D0=BE=D0=B2=20=D0=B2=20=D0=B3?= =?UTF-8?q?=D0=BB=D0=B0=D0=B2=D0=BD=D0=BE=D0=BC=20=D1=88=D0=B0=D0=B1=D0=BB?= =?UTF-8?q?=D0=BE=D0=BD=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/course/inclusion/category_menu_items.html | 5 +++++ apps/course/templatetags/lilcity_category.py | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 apps/course/templates/course/inclusion/category_menu_items.html diff --git a/apps/course/templates/course/inclusion/category_menu_items.html b/apps/course/templates/course/inclusion/category_menu_items.html new file mode 100644 index 00000000..a6b5528a --- /dev/null +++ b/apps/course/templates/course/inclusion/category_menu_items.html @@ -0,0 +1,5 @@ +{% for category in category_items %} + +
{{ category.title }}
+
+{% endfor %} \ No newline at end of file diff --git a/apps/course/templatetags/lilcity_category.py b/apps/course/templatetags/lilcity_category.py index 1d8666c6..2b00a750 100644 --- a/apps/course/templatetags/lilcity_category.py +++ b/apps/course/templatetags/lilcity_category.py @@ -2,10 +2,14 @@ from django import template from ..models import Category - register = template.Library() @register.inclusion_tag('course/inclusion/category_items.html') def category_items(): - return {"category_items": Category.manager.all()} + return {"category_items": Category.objects.all()} + + +@register.inclusion_tag('course/inclusion/category_menu_items.html') +def category_menu_items(): + return {"category_items": Category.objects.all()}