Is there a way to understand the previous url in django view? I mean how can become aware from which url(page in my site) user is coming to this url? i’ve found doing this in template, but i want to know it in views.
def func(request):
if request.is_ajax():
//if the last url was the url of this page, do s.th
//else do s.th else
thank you
should do the trick.