Commit 380b8c23 authored by Willard's avatar Willard

Make dish in URL plural

parent bee55882
...@@ -141,7 +141,7 @@ def delete_stall(stall_id): ...@@ -141,7 +141,7 @@ def delete_stall(stall_id):
return redirect(url_for('stalls')) return redirect(url_for('stalls'))
@app.route('/stalls/<int:stall_id>/dish/new', methods=['GET','POST']) @app.route('/stalls/<int:stall_id>/dishes/new', methods=['GET','POST'])
@login_required @login_required
@stall_validate @stall_validate
def new_dish(stall_id): def new_dish(stall_id):
...@@ -161,7 +161,7 @@ def new_dish(stall_id): ...@@ -161,7 +161,7 @@ def new_dish(stall_id):
else: else:
return render_template('newdish.html', form=form, stall=stall) return render_template('newdish.html', form=form, stall=stall)
@app.route('/stalls/<int:stall_id>/dish/<int:dish_id>/edit', methods=['GET', 'POST']) @app.route('/stalls/<int:stall_id>/dishes/<int:dish_id>/edit', methods=['GET', 'POST'])
@login_required @login_required
@dish_validate @dish_validate
def edit_dish(stall_id, dish_id): def edit_dish(stall_id, dish_id):
...@@ -188,7 +188,7 @@ def edit_dish(stall_id, dish_id): ...@@ -188,7 +188,7 @@ def edit_dish(stall_id, dish_id):
return render_template('editdish.html', form=form, stall=stall, dish=dish) return render_template('editdish.html', form=form, stall=stall, dish=dish)
@app.route('/stalls/<int:stall_id>/dish/<int:dish_id>/delete', methods=['POST']) @app.route('/stalls/<int:stall_id>/dishes/<int:dish_id>/delete', methods=['POST'])
@login_required @login_required
@dish_validate @dish_validate
def delete_dish(stall_id, dish_id): def delete_dish(stall_id, dish_id):
......
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