25 lines
746 B
Python
25 lines
746 B
Python
from flask import Flask, render_template, request, redirect, url_for
|
|
import os
|
|
|
|
app = Flask(__name__)
|
|
|
|
@app.route('/')
|
|
def index():
|
|
return render_template('index.html')
|
|
|
|
@app.route('/show_image', methods=['POST'])
|
|
def show_image():
|
|
if request.method == 'POST':
|
|
global question_number
|
|
question_number = request.form['question_number']
|
|
|
|
return render_template('show_image.html', image_path=f'/static/{question_number}.png')
|
|
|
|
@app.route('/submit_remarks', methods=['POST'])
|
|
def submit_remarks():
|
|
category = request.form['category']
|
|
remarks = request.form['remarks']
|
|
return render_template('show_remarks.html', category=category, remarks=remarks)
|
|
|
|
if __name__ == '__main__':
|
|
app.run(debug=True) |