Socialify

Folder ..

Viewing replace.py
8 lines (6 loc) • 235.0 B

1
2
3
4
5
6
7
8
from django import template

register = template.Library()

@register.filter(name='replace')
# Takes two arguments: the string to be replaced and the string to replace it with
def replace(value, arg):
    return value.replace(arg, '')