Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

PREVIOUS NEXT
Code Example
Python :: end python print with space 
Python :: python play music 
Python :: how do i get parent directory python 
Python :: django slug int url mapping 
Python :: rename in python 
Python :: replace nan with 0 pandas 
Python :: read value from entry tkinter 
Python :: how to create a variablein python 
Python :: jupyter tabnine for jupyter notebook 
Python :: how to write a script to display an image in python 
Python :: pyplot python 
Python :: set allowed methods flask 
Python :: set xlim histogram python 
Python :: check if argv exists python 
Python :: python to executable windows 
Python :: read a file python 
Python :: fillna with median , mode and mean 
Python :: detect character in string python 
Python :: python raise typeerror 
Python :: digit sum codechef 
Python :: python get the app path 
Python :: ord python 
Python :: Extract bounding boxes OpenCV 
Python :: raku fibonacci 
Python :: get last n in array python 
Python :: list files in python 
Python :: array of numbers 
Python :: model evaluate function 
Python :: soup itemprop 
Python :: python extract list from string 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =