One of the way is using HTTP_REFERER
header like as below:
from django.http import HttpResponseRedirect
def someview(request):
...
return HttpResponseRedirect(request.META.get('HTTP_REFERER'))
Not sure of cons of this!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…