fix
This commit is contained in:
parent
998ff03f67
commit
4efb65ea44
5
app.py
5
app.py
@ -19,7 +19,7 @@ def index():
|
||||
cs.execute(statement)
|
||||
return render_template("index.html", comments=cs.fetchall())
|
||||
|
||||
@app.route('/submit', methods=["POST"])
|
||||
@app.route('/gb/submit', methods=["POST"])
|
||||
def submit():
|
||||
errors = []
|
||||
name = request.form.get("name")
|
||||
@ -46,4 +46,5 @@ def submit():
|
||||
values = (name, website, comment, int(time.time()), str(request.remote_addr))
|
||||
cs.execute(statement, values)
|
||||
db.commit()
|
||||
return redirect("/")
|
||||
#change this if you run it on anything other than /gb
|
||||
return redirect("/gb")
|
@ -7,7 +7,7 @@
|
||||
<link rel="stylesheet" href="static/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<form method="POST" action="submit">
|
||||
<form method="POST" action="/gb/submit">
|
||||
<input name="name" placeholder="Name (optional)">
|
||||
<input name="website" placeholder="Website (optional, w/o the http(s) part)">
|
||||
<textarea name="comment" placeholder="Comment (max 512 characters)"></textarea>
|
||||
|
Loading…
Reference in New Issue
Block a user