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
9961681f
Commit
9961681f
authored
Nov 15, 2016
by
Willard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix errors in dish_view.py
parent
2f7a04c2
Changes
1
Hide 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 @
9961681f
...
@@ -51,12 +51,15 @@ class EditDishView(FormView):
...
@@ -51,12 +51,15 @@ class EditDishView(FormView):
db
.
session
.
commit
()
db
.
session
.
commit
()
return
redirect
(
url_for
(
'view_stall'
,
stall_id
=
stall
.
id
))
return
redirect
(
url_for
(
'view_stall'
,
stall_id
=
stall
.
id
))
def
render_get
(
self
,
stall_id
,
dish_id
):
def
render_get
(
self
,
stall_id
,
dish_id
):
form
=
self
.
get_form
()
form
.
name
.
data
=
self
.
dish
.
name
form
.
name
.
data
=
self
.
dish
.
name
form
.
description
.
data
=
self
.
dish
.
description
form
.
description
.
data
=
self
.
dish
.
description
form
.
price
.
data
=
self
.
dish
.
price
form
.
price
.
data
=
self
.
dish
.
price
return
render_template
(
'editdish.html'
,
form
=
form
,
stall
=
self
.
stall
,
dish
=
self
.
dish
)
return
render_template
(
'editdish.html'
,
form
=
form
,
stall
=
self
.
stall
,
dish
=
self
.
dish
)
def
get_form
(
self
):
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
):
class
DeleteDishView
(
View
):
decorators
=
[
login_required
,
dish_validate
]
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