#NEWLINE# def _get_next( request ) : #NEWLINE# #INDENT# "\n    The part that's the least straightforward about views in this module is\n    how they determine their redirects after they have finished computation.\n\n    In short, they will try and determine the next place to go in the\n    following order:\n\n    1. If there is a variable named ``next`` in the *POST* parameters, the\n       view will redirect to that variable's value.\n    2. If there is a variable named ``next`` in the *GET* parameters,\n       the view will redirect to that variable's value.\n    3. If Django can determine the previous page from the HTTP headers,\n       the view will redirect to that previous page.\n    " #NEWLINE# next = request . POST . get ( 'next' , request . GET . get ( 'next' , request . META . get ( 'HTTP_REFERER' , None ) ) ) #NEWLINE# if ( not request ) : #NEWLINE# #INDENT# next = request . path #NEWLINE# #UNINDENT# return next