From 91714c756582e277a87567a15999cd292969a2b3 Mon Sep 17 00:00:00 2001 From: "Tomas \"Jethro\" Pokorny" Date: Wed, 16 Oct 2019 22:27:57 +0200 Subject: [PATCH] =?UTF-8?q?Nov=C3=A1=20aplikace=20na=20menu.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mamweb/settings_common.py | 3 +++ mamweb/templates/base.html | 21 +++++++++++++++++++++ requirements.txt | 1 + 3 files changed, 25 insertions(+) diff --git a/mamweb/settings_common.py b/mamweb/settings_common.py index 1a8984e3..7bdd6abf 100644 --- a/mamweb/settings_common.py +++ b/mamweb/settings_common.py @@ -74,6 +74,7 @@ TEMPLATES = [ 'OPTIONS': { 'context_processors': ( 'django.contrib.auth.context_processors.auth', + 'django.template.context_processors.request', 'django.contrib.messages.context_processors.messages', 'sekizai.context_processors.sekizai', 'mamweb.context_processors.vzhled', @@ -114,6 +115,8 @@ INSTALLED_APPS = ( 'django.contrib.flatpages', 'django.contrib.humanize', + 'sitetree', + 'imagekit', 'polymorphic', diff --git a/mamweb/templates/base.html b/mamweb/templates/base.html index 310234da..50a865bd 100644 --- a/mamweb/templates/base.html +++ b/mamweb/templates/base.html @@ -1,4 +1,5 @@ {% load staticfiles sekizai_tags %} +{% load sitetree %} @@ -96,6 +97,26 @@
+ {% sitetree_menu from "main_menu" include "trunk" %} + + {# + {% for item in menu_top %} +
  • + {{ item.name }} +
  • + {% if item.submenu %} + + {% endif %} + {% endfor %} + #} + +
    {% block content %} {% endblock content %} diff --git a/requirements.txt b/requirements.txt index 99794896..f2fd4306 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,6 +26,7 @@ django-autocomplete-light django-crispy-forms django-imagekit django-polymorphic +django-sitetree # Comments akismet==1.0.1