Template tag to get url
from django import template
from django.urls import reverse_lazy
register = template.Library()
@register.filter(name='geturl')
def geturl(value):
"""Return the url from a string value"""
return reverse_lazy(value)