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
30ea4d5c
Commit
30ea4d5c
authored
Nov 15, 2016
by
Willard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix syntax errors
parent
423d015e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
stall_views.py
canteeneo/stall_views.py
+3
-3
No files found.
canteeneo/stall_views.py
View file @
30ea4d5c
...
...
@@ -19,7 +19,7 @@ class NewStallView(FormView):
stall
=
Stall
(
form
.
name
.
data
,
form
.
description
.
data
,
current_user
.
id
,
form
.
location
.
data
)
db
.
session
.
add
(
stall
)
db
.
session
.
commit
()
return
redirect
(
url_for
(
'view_stall'
,
stall_id
=
stall
.
id
))
return
redirect
(
url_for
(
'view_stall'
,
stall_id
=
s
elf
.
s
tall
.
id
))
def
render_get
(
self
):
return
render_template
(
'newstall.html'
,
form
=
self
.
get_form
())
def
get_form
(
self
):
...
...
@@ -44,14 +44,14 @@ class EditStallView(FormView):
self
.
stall
.
name
=
form
.
name
.
data
self
.
stall
.
description
=
form
.
description
.
data
self
.
stall
.
location_id
=
form
.
location
.
data
db
.
session
.
co
nnec
t
()
db
.
session
.
co
mmi
t
()
return
redirect
(
url_for
(
'view_stall'
,
stall_id
=
stall_id
))
def
render_get
(
self
,
stall_id
):
form
=
self
.
get_form
()
form
.
name
.
data
=
self
.
stall
.
name
form
.
description
.
data
=
self
.
stall
.
description
form
.
location
.
data
=
self
.
stall
.
location_id
return
render_template
(
'editstall.html'
,
form
=
form
,
stall
=
stall
)
return
render_template
(
'editstall.html'
,
form
=
form
,
stall
=
s
elf
.
s
tall
)
def
get_form
(
self
):
form
=
StallRegisterForm
()
form
.
location
.
choices
=
[(
loc
.
id
,
loc
.
name
)
for
loc
in
Location
.
query
.
all
()]
...
...
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