give more feedback on action
This commit is contained in:
@@ -20,4 +20,6 @@ def index_post():
|
|||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
with open(app.config.get("MESSAGE_FILE"), 'w') as f:
|
with open(app.config.get("MESSAGE_FILE"), 'w') as f:
|
||||||
f.write(str(input_message))
|
f.write(str(input_message))
|
||||||
return redirect("/")
|
result = "Success: The autoreply message has been updated!"
|
||||||
|
|
||||||
|
return render_template("result.html", result=result)
|
||||||
|
|||||||
@@ -1,13 +1,19 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<head>
|
<head>
|
||||||
<title>Autoreply Editor</title>
|
<title>Autoreply Editor</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<form action="" method="POST">
|
<h1>Autoreply Editor</h1>
|
||||||
<textarea name="message" cols="70" rows="10">{{ message }}</textarea>
|
|
||||||
<br />
|
<p>
|
||||||
<input type="submit" value="Update">
|
Below you can see the current text of your autoreply message. You
|
||||||
</form>
|
can edit and update it directly below:
|
||||||
</body>
|
</p>
|
||||||
|
<form action="" method="POST">
|
||||||
|
<textarea name="message" cols="120" rows="20">{{ message }}</textarea>
|
||||||
|
<br />
|
||||||
|
<input type="submit" value="Update">
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
14
autoreply_editor/templates/result.html
Normal file
14
autoreply_editor/templates/result.html
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<head>
|
||||||
|
<title>Autoreply Editor</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>Autoreply Editor</h1>
|
||||||
|
|
||||||
|
<p>{{ result }}</p>
|
||||||
|
|
||||||
|
<p><a href="/">Go back</a></p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user