add post request for submitting toasts (pastes)
This commit is contained in:
parent
72e00ac8e8
commit
e785b1c27e
2 changed files with 13 additions and 0 deletions
|
@ -10,4 +10,8 @@ instance = config['instance']['domain']
|
|||
def index():
|
||||
return render_template('index.j2', instance=instance)
|
||||
|
||||
@app.route("/new", methods=['GET', 'POST'])
|
||||
def new():
|
||||
return render_template('new.j2', instance=instance)
|
||||
|
||||
app.run(debug=True)
|
||||
|
|
|
@ -14,4 +14,13 @@
|
|||
<p>
|
||||
please follow the <a href="rules">rules</a> of {{ instance }}.
|
||||
</p>
|
||||
<form method="post">
|
||||
<label for="name">toast name: </label>
|
||||
<input name="name" id="name" placeholder="name" />
|
||||
<br>
|
||||
<label for="contents">toast contents</label>
|
||||
<br>
|
||||
<textarea name="contents" id="contents" placeholder="write something here vro"></textarea>
|
||||
<button type="post">share paste</button>
|
||||
</form>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Reference in a new issue