def _get_next(request):
 next = request.POST.get('next', request.GET.get('next', request.META.get('HTTP_REFERER', None)))
 if (not next):
  next = request.path
 return next

def _get_next ( request ) : next = request . POST . get ( 'next' , request . GET . get ( 'next' , request . META . get ( 'HTTP_REFERER' , None ) ) ) if ( not next ) : next = request . path return next
the part thats the least straightforward about views in this module is how they determine their redirects after they have finished computation .