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
33d2eb77
Commit
33d2eb77
authored
Nov 15, 2016
by
Willard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Fix wrong number of arguments for overriding dispatch_request"
This reverts commit
e850bf0c
.
parent
e850bf0c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
dish_views.py
canteeneo/dish_views.py
+2
-2
stall_views.py
canteeneo/stall_views.py
+1
-1
No files found.
canteeneo/dish_views.py
View file @
33d2eb77
...
...
@@ -14,7 +14,7 @@ class NewDishView(FormView):
decorators
=
[
login_required
,
stall_validate
]
def
dispatch_request
(
self
,
stall_id
):
self
.
stall
=
Stall
.
query
.
get
(
stall_id
)
return
FormView
.
dispatch_request
(
self
)
return
FormView
.
dispatch_request
(
self
,
stall_id
)
def
render_post
(
self
,
stall_id
):
filename
=
secure_filename
(
form
.
image
.
data
.
filename
)
dish
=
Dish
(
form
.
name
.
data
,
form
.
description
.
data
,
form
.
price
.
data
,
self
.
stall
.
id
,
filename
)
...
...
@@ -37,7 +37,7 @@ class EditDishView(FormView):
def
dispatch_request
(
self
,
stall_id
,
dish_id
):
self
.
stall
=
Stall
.
query
.
get
(
stall_id
)
self
.
dish
=
Dish
.
query
.
get
(
dish_id
)
return
FormView
.
dispatch_request
(
self
)
return
FormView
.
dispatch_request
(
self
,
stall_id
,
dish_id
)
def
render_post
(
self
,
stall_id
,
dish_id
):
self
.
dish
.
name
=
form
.
name
.
data
self
.
dish
.
description
=
form
.
description
.
data
...
...
canteeneo/stall_views.py
View file @
33d2eb77
...
...
@@ -38,7 +38,7 @@ class EditStallView(FormView):
decorators
=
[
login_required
,
stall_validate
]
def
dispatch_request
(
self
,
stall_id
):
self
.
stall
=
Stall
.
query
.
get
(
stall_id
)
return
FormView
.
dispatch_request
(
self
)
return
FormView
.
dispatch_request
(
self
,
stall_id
)
def
render_post
(
self
,
stall_id
):
form
=
self
.
get_form
()
self
.
stall
.
name
=
form
.
name
.
data
...
...
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