forked from Christian-Downs/AutoSAS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutputTest.txt
More file actions
33 lines (25 loc) · 999 Bytes
/
outputTest.txt
File metadata and controls
33 lines (25 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Here is the updated code for your Flask application without any explanation:
```python
from flask import Flask, render_template, request, redirect, url_for
app = Flask(__name__)
# List to store people information
people = []
@app.route('/', methods=['GET', 'POST'])
def index():
if request.method == 'POST':
name = request.form.get('name')
age = request.form.get('age')
email = request.form.get('email')
# Append new person to the list
if name and age and email:
people.append({
'name': name,
'age': age,
'email': email
})
return redirect(url_for('index'))
return render_template('index.html', people=people)
if __name__ == '__main__':
app.run(debug=True, use_reloader=False)
```
Make sure your `index.html` template is correctly set up and located in the `templates` folder. Run the application and it should work without the 'Bad file descriptor' error.