Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
052cee88
authored
Apr 18, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: support extra Operation args in OperationView
parent
3f7f0833
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
circle/dashboard/views.py
+5
-3
No files found.
circle/dashboard/views.py
View file @
052cee88
...
@@ -442,7 +442,7 @@ class OperationView(DetailView):
...
@@ -442,7 +442,7 @@ class OperationView(DetailView):
return
self
.
_opobj
return
self
.
_opobj
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
ctx
=
super
(
OperationView
,
self
)
.
get_context_data
(
form
=
None
,
**
kwargs
)
ctx
=
super
(
OperationView
,
self
)
.
get_context_data
(
**
kwargs
)
ctx
[
'op'
]
=
self
.
get_op
()
ctx
[
'op'
]
=
self
.
get_op
()
ctx
[
'url'
]
=
self
.
request
.
path
ctx
[
'url'
]
=
self
.
request
.
path
return
ctx
return
ctx
...
@@ -455,10 +455,12 @@ class OperationView(DetailView):
...
@@ -455,10 +455,12 @@ class OperationView(DetailView):
{
'body'
:
response
.
content
})
{
'body'
:
response
.
content
})
return
response
return
response
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
def
post
(
self
,
request
,
extra
=
None
,
*
args
,
**
kwargs
):
self
.
object
=
self
.
get_object
()
self
.
object
=
self
.
get_object
()
if
extra
is
None
:
extra
=
{}
try
:
try
:
self
.
get_op
()
.
async
(
user
=
request
.
user
)
self
.
get_op
()
.
async
(
user
=
request
.
user
,
**
extra
)
except
Exception
as
e
:
except
Exception
as
e
:
messages
.
error
(
request
,
_
(
'Could not start operation.'
))
messages
.
error
(
request
,
_
(
'Could not start operation.'
))
logger
.
error
(
e
)
logger
.
error
(
e
)
...
...
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