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
de661166
Commit
de661166
authored
Nov 15, 2016
by
Willard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix errors in dish_view.py
parent
411d9a2d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
dish_views.py
canteeneo/dish_views.py
+4
-1
No files found.
canteeneo/dish_views.py
View file @
de661166
...
...
@@ -52,12 +52,15 @@ class EditDishView(FormView):
db
.
session
.
commit
()
return
redirect
(
url_for
(
'view_stall'
,
stall_id
=
self
.
stall
.
id
))
def
render_get
(
self
,
stall_id
,
dish_id
):
form
=
self
.
get_form
()
form
.
name
.
data
=
self
.
dish
.
name
form
.
description
.
data
=
self
.
dish
.
description
form
.
price
.
data
=
self
.
dish
.
price
return
render_template
(
'editdish.html'
,
form
=
form
,
stall
=
self
.
stall
,
dish
=
self
.
dish
)
def
get_form
(
self
):
return
DishRegisterForm
()
form
=
DishRegisterForm
()
form
.
dish_type
.
choices
=
[(
dish_type
.
id
,
dish_type
.
name
)
for
dish_type
in
DishType
.
query
.
all
()]
return
form
class
DeleteDishView
(
View
):
decorators
=
[
login_required
,
dish_validate
]
...
...
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