Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
allgo
allgo
Commits
f6edd85e
Commit
f6edd85e
authored
Jun 20, 2018
by
BERJON Matthieu
Browse files
Enforcing PEP 3135
Signed-off-by:
Matthieu Berjon
<
matthieu.berjon@inria.fr
>
parent
43f1ca85
Changes
1
Show whitespace changes
Inline
Side-by-side
django/allgo/main/views.py
View file @
f6edd85e
...
...
@@ -547,13 +547,14 @@ class JobCreate(SuccessMessageMixin, LoginRequiredMixin, CreateView):
if
self
.
request
.
FILES
:
latest_job
=
Job
.
objects
.
filter
(
user_id
=
self
.
request
.
user
.
id
).
order_by
(
'-id'
)[
0
]
upload_data
(
self
.
request
.
FILES
.
getlist
(
'files'
),
latest_job
.
id
)
return
super
(
JobCreate
,
self
).
form_valid
(
form
)
return
super
().
form_valid
(
form
)
def
get_context_data
(
self
,
**
kwargs
):
"""Pass on the docker name to the template"""
webapp
=
Webapp
.
objects
.
get
(
docker_name
=
self
.
kwargs
[
'docker_name'
])
kwargs
[
'webapp_name'
]
=
webapp
.
name
return
super
(
JobCreate
,
self
).
get_context_data
(
**
kwargs
)
return
super
().
get_context_data
(
**
kwargs
)
def
get_form_kwargs
(
self
):
"""Return webapp data"""
...
...
Write
Preview
Supports
Markdown
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