Commit bbc5e9c1 authored by Willard's avatar Willard

Allow POST for stall endpoint

parent 76154157
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="dashboard-row"> <div class="dashboard-row">
<a href="{{ url_for('stall', stall_id=stall.id) }}"><button class="list-button">Manage Stall</button></a> <a href="{{ url_for('stall', stall_id=stall.id) }}"><button class="list-button">Manage Stall</button></a>
<form action="{{ url_for('stall', stall_id=stall.id) }}" method="POST" onsubmit="return confirm('Are you sure you want to delete {{stall.name}}?');"> <form action="{{ url_for('stall', stall_id=stall.id) }}" method="POST" onsubmit="return confirm('Are you sure you want to delete {{stall.name}}?');">
<input type="hidden" name="_method" value="DELETE" > <input type="hidden" name="_method" value="DELETE" />
<button type="submit" class="list-button button-delete">Delete</button> <button type="submit" class="list-button button-delete">Delete</button>
</form> </form>
</div> </div>
......
...@@ -112,7 +112,7 @@ stalls = StallView.as_view('stalls') ...@@ -112,7 +112,7 @@ stalls = StallView.as_view('stalls')
stall = StallView.as_view('stall') stall = StallView.as_view('stall')
app.add_url_rule('/stalls/', view_func=stalls, defaults={'stall_id': None}, methods=['GET', 'POST']) app.add_url_rule('/stalls/', view_func=stalls, defaults={'stall_id': None}, methods=['GET', 'POST'])
app.add_url_rule('/stalls/', view_func=stalls, methods=['POST']) app.add_url_rule('/stalls/', view_func=stalls, methods=['POST'])
app.add_url_rule('/stalls/<int:stall_id>', view_func=stall, methods=['GET', 'PUT', 'DELETE']) app.add_url_rule('/stalls/<int:stall_id>/', view_func=stall, methods=['GET', 'POST', 'PUT', 'DELETE'])
@app.route('/stalls/new', methods=['GET']) @app.route('/stalls/new', methods=['GET'])
@login_required @login_required
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment