Answers for "absolute url"

2

relative ur;

## Relative URl
<a href = "/xyz.html">

##Absolute
<a href = http://www.example.com/xyz.html>
Posted by: Guest on September-16-2020
2

absolute url

from django.urls import reverse

def get_absolute_url(self):
        return reverse('author-detail', kwargs={'pk': self.pk})
Posted by: Guest on October-12-2020
0

get absolute url

from django.urls import reverse

def get_absolute_url(self):
        return reverse('your:url', kwargs={'pk': self.pk})
Posted by: Guest on October-11-2020

Python Answers by Framework

Browse Popular Code Answers by Language