1👍
✅
Yes, you can get it from the request.META
object.
referer = request.META.get('HTTP_REFERER')
Alternatively, you can resolve the URL using reverse()
method
from django.core.urlresolvers import reverse
url = reverse('basic')
Source:stackexchange.com