html Absolute local URLs code example
Example 1: absolute url
from django.urls import reverse
def get_absolute_url(self):
return reverse('author-detail', kwargs={'pk': self.pk})
Example 2: get absolute url
from django.urls import reverse
def get_absolute_url(self):
return reverse('your:url', kwargs={'pk': self.pk})