mirror of https://github.com/sipwise/repoapi.git
* we can't use '.' at html if attribute Change-Id: I15b94aeb8200ea24853ac9dfa92df8f179d0bd37pull/7/head
parent
dd26740524
commit
653f0e629b
@ -0,0 +1,25 @@
|
||||
# Copyright (C) 2022 The Sipwise Team - http://sipwise.com
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU 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 General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
from django import template
|
||||
from django.template.defaultfilters import stringfilter
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@register.filter
|
||||
@stringfilter
|
||||
def replace_dots(value, arg):
|
||||
"""Replaces all values of '.' to arg from the given string"""
|
||||
return value.replace(".", arg)
|
Loading…
Reference in new issue