Is it possible to rewrite a URL with Flask e.g. if a POST request is received via this route:
@app.route('/', methods=['GET','POST'])
def main():
    if request.method == 'POST':
        #TODO: rewrite url to something like '/message'
        return render_template('message.html')
    else:
        return render_template('index.html')
I'm aware I can use a redirect and setup another route but I prefer to simply modify the url if possible.
 
     
     
    