From 1309805513a7dcdc77cef1046d0e153e9252104e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Fri, 1 Nov 2024 10:38:23 -0300 Subject: [PATCH] =?UTF-8?q?Remo=C3=A7=C3=A3o=20de=20coisas=20desnecess?= =?UTF-8?q?=C3=A1rias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/home/templatetags/menus.py | 13 ------------- sigi/settings.py | 1 - 2 files changed, 14 deletions(-) delete mode 100644 sigi/apps/home/templatetags/menus.py diff --git a/sigi/apps/home/templatetags/menus.py b/sigi/apps/home/templatetags/menus.py deleted file mode 100644 index 0667247..0000000 --- a/sigi/apps/home/templatetags/menus.py +++ /dev/null @@ -1,13 +0,0 @@ -import yaml -from django import template -from django.conf import settings - -register = template.Library() - -with open(settings.MENU_FILE, "r") as menu_file: - menus = yaml.load(menu_file, yaml.FullLoader) - - -@register.inclusion_tag("menus/menu.html", takes_context=True) -def show_menu(context, menu_id): - return {"menu_items": menus[menu_id], "request": context.request} diff --git a/sigi/settings.py b/sigi/settings.py index 61c464f..882936b 100644 --- a/sigi/settings.py +++ b/sigi/settings.py @@ -283,7 +283,6 @@ REST_FRAMEWORK = { # SIGI specific settings -MENU_FILE = BASE_DIR / "menu_conf.yaml" HOSPEDAGEM_PATH = Path(env("HOSPEDAGEM_PATH", default="/tmp/HOSP/")) REGISTRO_PATH = Path(env("REGISTRO_PATH", default="/tmp/DNS/"))