misc: remove |get template filter from chrono (#65540)

it is defined publik-django-templatetags
This commit is contained in:
Lauréline Guérin 2022-05-20 23:22:29 +02:00
parent 81afbc271f
commit 75c8a2abc0
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
3 changed files with 2 additions and 33 deletions

View File

@ -1,4 +1,4 @@
{% load i18n chrono %}
{% load i18n %}
{% with slots=form.get_slots %}
{% with events_num=slots.events|length %}

View File

@ -1,31 +0,0 @@
# chrono - agendas system
# Copyright (C) 2022 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from django import template
register = template.Library()
@register.filter(name='get')
def get(obj, key):
try:
return obj.get(key)
except AttributeError:
try:
return obj[key]
except (IndexError, KeyError, TypeError):
return None

View File

@ -1,5 +1,5 @@
{% extends "chrono/pricing/manager_agenda_pricing_detail.html" %}
{% load i18n chrono %}
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}