From eebbe378ff27305b148f39f9e2c4829ec7a88a3e Mon Sep 17 00:00:00 2001 From: Lude Ribeiro Date: Thu, 11 Nov 2021 10:10:40 -0300 Subject: [PATCH] Adcionando submenu de Visitas Interlegis --- sigi/apps/eventos/admin.py | 4 ++++ sigi/apps/home/templatetags/menu_conf.yaml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/sigi/apps/eventos/admin.py b/sigi/apps/eventos/admin.py index e82717e..4879618 100644 --- a/sigi/apps/eventos/admin.py +++ b/sigi/apps/eventos/admin.py @@ -91,3 +91,7 @@ class EventoAdmin(admin.ModelAdmin): return HttpResponseRedirect('.') adicionar_eventos.short_description = _(u"Armazenar eventos no carrinho " u"para exportar") + + def lookup_allowed(self, lookup, value): + return (super(EventoAdmin, self).lookup_allowed(lookup, value) or + lookup in ['tipo_evento__nome__exact',]) diff --git a/sigi/apps/home/templatetags/menu_conf.yaml b/sigi/apps/home/templatetags/menu_conf.yaml index c441946..bb86084 100644 --- a/sigi/apps/home/templatetags/menu_conf.yaml +++ b/sigi/apps/home/templatetags/menu_conf.yaml @@ -47,6 +47,8 @@ main_menu: children: - title: Eventos url: eventos/evento/ + - title: Visitas Interlegis + url: eventos/evento/?tipo_evento__nome__exact=Visita Interlegis - title: Calendário mensal url: eventos/calendario - title: Alocação de equipe