Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

redirect a post request django

def redirected_view(request):
    # Some processing if needed
    ...
    # save post data to session & redirect
    request.session['_post_data'] = request.POST
    return HttpResponseRedirect('redirect_to_view')

def redirect_to_view(request):
    old_post = request.session.get('_post_data')
    # Use saved _post_data & delete it
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #redirect #post #request #django
ADD COMMENT
Topic
Name
4+3 =