Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CS123-Canteeneo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Willard Torres
CS123-Canteeneo
Commits
bbc5e9c1
Commit
bbc5e9c1
authored
Nov 08, 2016
by
Willard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow POST for stall endpoint
parent
76154157
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
stalls.html
canteeneo/templates/stalls.html
+1
-1
views.py
canteeneo/views.py
+1
-1
No files found.
canteeneo/templates/stalls.html
View file @
bbc5e9c1
...
...
@@ -20,7 +20,7 @@
<div
class=
"dashboard-row"
>
<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}}?');"
>
<input
type=
"hidden"
name=
"_method"
value=
"DELETE"
>
<input
type=
"hidden"
name=
"_method"
value=
"DELETE"
/
>
<button
type=
"submit"
class=
"list-button button-delete"
>
Delete
</button>
</form>
</div>
...
...
canteeneo/views.py
View file @
bbc5e9c1
...
...
@@ -112,7 +112,7 @@ stalls = StallView.as_view('stalls')
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
,
methods
=
[
'POST'
])
app
.
add_url_rule
(
'/stalls/<int:stall_id>
'
,
view_func
=
stall
,
methods
=
[
'GE
T'
,
'PUT'
,
'DELETE'
])
app
.
add_url_rule
(
'/stalls/<int:stall_id>
/'
,
view_func
=
stall
,
methods
=
[
'GET'
,
'POS
T'
,
'PUT'
,
'DELETE'
])
@
app
.
route
(
'/stalls/new'
,
methods
=
[
'GET'
])
@
login_required
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment