misc: remove |get template filter from chrono (#65540)
it is defined publik-django-templatetags
This commit is contained in:
parent
81afbc271f
commit
75c8a2abc0
|
@ -1,4 +1,4 @@
|
|||
{% load i18n chrono %}
|
||||
{% load i18n %}
|
||||
|
||||
{% with slots=form.get_slots %}
|
||||
{% with events_num=slots.events|length %}
|
||||
|
|
|
@ -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
|
|
@ -1,5 +1,5 @@
|
|||
{% extends "chrono/pricing/manager_agenda_pricing_detail.html" %}
|
||||
{% load i18n chrono %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block breadcrumb %}
|
||||
{{ block.super }}
|
||||
|
|
Loading…
Reference in New Issue