[Answered ]-Django how to use get_absolute_url with a uuid field

2πŸ‘

βœ…

In your get_absolute_url method, convert the UUID instance to str. Something like this should work.

def get_absolute_url(self):
    return reverse('suggies:detail_box', args=[str(self.slug)])
πŸ‘€v1k45

Leave a comment