absolute url code example
Example 1: relative ur;
## Relative URl
<a href = "/xyz.html">
##Absolute
<a href = http://www.example.com/xyz.html>
Example 2: absolute url
from django.urls import reverse
def get_absolute_url(self):
return reverse('author-detail', kwargs={'pk': self.pk})
Example 3: get absolute url
from django.urls import reverse
def get_absolute_url(self):
return reverse('your:url', kwargs={'pk': self.pk})