[Fixed]-Sending url form Model to Template in Django

1👍

The problem is that it formats as a html safe string. So try using url reverse function and concat it with the string you return from the below finction.

Try using the below code in models.

from django.core.urlresolvers import reverse

def get_absolute_url(self):
    return reverse('tickets:agregar_seguimiento', kwargs={'id':self.id})

For more detailed reference django.core.urlresolvers

Leave a comment