'i want have two different buttons having different functionality in flask app

[when i click the upload button it will direct us to another html page where it will ask to upload the file]

1https://i.stack.imgur.com/i8zf8.png

So the problem is that i've made a flask app where there are two buttons.
Button 1) we can upload a csv file through it
Button 2) we can fill a form in it

When i'm clicking the button it it going to the respective html pages. But while clicking the upload button or submit form. It is unable to do that.

I've attached the image link in the description.

This is my code so far.

import glob  
import os  
import warnings  
import csv    
import xlsxwriter

import jsonpickle
import time

app = Flask(__name__)

app.config.from_object(__name__) 

@app.route('/')  
def index():  
    return render_template('button.html')

@app.route('/upload')             
def upload():          
    return render_template('upload.html')

def allowed_CV_file(filename):
    #code for only uploading csv file

@app.route("/uploader", methods=['GET','POST'])
def uploader():
    #whatever the function is to upoad the file in path

@app.route('/form_fill')    
def form_fill():
    return render_template('jdfillupform.html')

if __name__ == '__main__':
    app.run('0.0.0.0' , 8089 , debug=False , threaded=True)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source