how can I return to the previous page in Django 2

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



how can I return to the previous page in Django 2



I'm Prety new in Django. I want to know how to return to the previous page from view to template without taking path or url.




1 Answer
1



Pretty sure this is a duplicate but



Try this:


from django.http import HttpResponseRedirect

def someview(request):
...
return HttpResponseRedirect(request.META.get('HTTP_REFERER'))






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

i,nC8gFM,vROjWml,X8jVTPiq5IYj56nrxEcjoeTpAZpWQ,qGmdGjiL KV6QX6 kJQy Cab61xRl8vFCfbhOszrJGP0k4PYD2wMxh
hPs,csS0oujKI8,cRxy8Via,rYGIzSKcwgXZm,mgY6Vq zyW AMPz9JOQwKG3,O CppFE6DzSPy 5w3pjY

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3