Answer the question
In order to leave comments, you need to log in
Does Flask request throw an error?
In short here is the python code
#import
from flask import Flask, render_template
from flask import request
from werkzeug.exceptions import BadRequestKeyError
#init
app = Flask(__name__)
#create pages
@app.route('/')
def SayHello():
return 'Why it is not working :('
@app.route('/class_founder', methods=['GET'])
def check():
key = request.form['text']
swap = True
#run app
app.run(debug=True)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Having time</title>
<link rel="stylesheet" href="static/style.css">
</head>
<body>
<section>
<form method="GET" action="/class_founder">
<input name='text' type="text">
<input type="submit" class="button" value="Start">
</form>
<div class="box">
<div class="bar" name='teacher_box'></div>
<div class="bar" name='subject_box'></div>
<div class="bar" name='student_box'></div>
</div>
</section>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
I wrote everything correctly 100%
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question