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
e850bf0c
Commit
e850bf0c
authored
Nov 15, 2016
by
Willard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix wrong number of arguments for overriding dispatch_request
parent
db9ce1d4
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 @
e850bf0c
...
@@ -14,7 +14,7 @@ class NewDishView(FormView):
...
@@ -14,7 +14,7 @@ class NewDishView(FormView):
decorators
=
[
login_required
,
stall_validate
]
decorators
=
[
login_required
,
stall_validate
]
def
dispatch_request
(
self
,
stall_id
):
def
dispatch_request
(
self
,
stall_id
):
self
.
stall
=
Stall
.
query
.
get
(
stall_id
)
self
.
stall
=
Stall
.
query
.
get
(
stall_id
)
return
FormView
.
dispatch_request
(
self
,
stall_id
)
return
FormView
.
dispatch_request
(
self
)
def
render_post
(
self
,
stall_id
):
def
render_post
(
self
,
stall_id
):
filename
=
secure_filename
(
form
.
image
.
data
.
filename
)
filename
=
secure_filename
(
form
.
image
.
data
.
filename
)
dish
=
Dish
(
form
.
name
.
data
,
form
.
description
.
data
,
form
.
price
.
data
,
self
.
stall
.
id
,
filename
)
dish
=
Dish
(
form
.
name
.
data
,
form
.
description
.
data
,
form
.
price
.
data
,
self
.
stall
.
id
,
filename
)
...
@@ -37,7 +37,7 @@ class EditDishView(FormView):
...
@@ -37,7 +37,7 @@ class EditDishView(FormView):
def
dispatch_request
(
self
,
stall_id
,
dish_id
):
def
dispatch_request
(
self
,
stall_id
,
dish_id
):
self
.
stall
=
Stall
.
query
.
get
(
stall_id
)
self
.
stall
=
Stall
.
query
.
get
(
stall_id
)
self
.
dish
=
Dish
.
query
.
get
(
dish_id
)
self
.
dish
=
Dish
.
query
.
get
(
dish_id
)
return
FormView
.
dispatch_request
(
self
,
stall_id
,
dish_id
)
return
FormView
.
dispatch_request
(
self
)
def
render_post
(
self
,
stall_id
,
dish_id
):
def
render_post
(
self
,
stall_id
,
dish_id
):
self
.
dish
.
name
=
form
.
name
.
data
self
.
dish
.
name
=
form
.
name
.
data
self
.
dish
.
description
=
form
.
description
.
data
self
.
dish
.
description
=
form
.
description
.
data
...
...
canteeneo/stall_views.py
View file @
e850bf0c
...
@@ -38,7 +38,7 @@ class EditStallView(FormView):
...
@@ -38,7 +38,7 @@ class EditStallView(FormView):
decorators
=
[
login_required
,
stall_validate
]
decorators
=
[
login_required
,
stall_validate
]
def
dispatch_request
(
self
,
stall_id
):
def
dispatch_request
(
self
,
stall_id
):
self
.
stall
=
Stall
.
query
.
get
(
stall_id
)
self
.
stall
=
Stall
.
query
.
get
(
stall_id
)
return
FormView
.
dispatch_request
(
self
,
stall_id
)
return
FormView
.
dispatch_request
(
self
)
def
render_post
(
self
,
stall_id
):
def
render_post
(
self
,
stall_id
):
form
=
self
.
get_form
()
form
=
self
.
get_form
()
self
.
stall
.
name
=
form
.
name
.
data
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