Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
1c151318
authored
Aug 11, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add OperationView.with_reload default value
parent
7e5a2690
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
circle/dashboard/views.py
+8
-7
No files found.
circle/dashboard/views.py
View file @
1c151318
...
@@ -518,6 +518,7 @@ class OperationView(RedirectToLoginMixin, DetailView):
...
@@ -518,6 +518,7 @@ class OperationView(RedirectToLoginMixin, DetailView):
show_in_toolbar
=
True
show_in_toolbar
=
True
effect
=
None
effect
=
None
wait_for_result
=
None
wait_for_result
=
None
with_reload
=
False
@property
@property
def
name
(
self
):
def
name
(
self
):
...
@@ -660,13 +661,14 @@ class AjaxOperationMixin(object):
...
@@ -660,13 +661,14 @@ class AjaxOperationMixin(object):
resp
=
super
(
AjaxOperationMixin
,
self
)
.
post
(
resp
=
super
(
AjaxOperationMixin
,
self
)
.
post
(
request
,
extra
,
*
args
,
**
kwargs
)
request
,
extra
,
*
args
,
**
kwargs
)
if
request
.
is_ajax
():
if
request
.
is_ajax
():
store
=
[]
if
not
self
.
with_reload
:
if
not
getattr
(
self
,
"with_reload"
,
False
):
store
=
messages
.
get_messages
(
request
)
store
=
messages
.
get_messages
(
request
)
store
.
used
=
True
store
.
used
=
True
else
:
store
=
[]
return
HttpResponse
(
return
HttpResponse
(
json
.
dumps
({
'success'
:
True
,
json
.
dumps
({
'success'
:
True
,
'with_reload'
:
getattr
(
self
,
'with_reload'
,
False
)
,
'with_reload'
:
self
.
with_reload
,
'messages'
:
[
unicode
(
m
)
for
m
in
store
]}),
'messages'
:
[
unicode
(
m
)
for
m
in
store
]}),
content_type
=
"application=json"
content_type
=
"application=json"
)
)
...
@@ -708,9 +710,8 @@ class FormOperationMixin(object):
...
@@ -708,9 +710,8 @@ class FormOperationMixin(object):
return
HttpResponse
(
return
HttpResponse
(
json
.
dumps
({
json
.
dumps
({
'success'
:
True
,
'success'
:
True
,
'with_reload'
:
getattr
(
self
,
'with_reload'
,
False
)}),
'with_reload'
:
self
.
with_reload
}),
content_type
=
"application=json"
content_type
=
"application=json"
)
)
else
:
else
:
return
resp
return
resp
else
:
else
:
...
@@ -720,7 +721,7 @@ class FormOperationMixin(object):
...
@@ -720,7 +721,7 @@ class FormOperationMixin(object):
class
RequestFormOperationMixin
(
FormOperationMixin
):
class
RequestFormOperationMixin
(
FormOperationMixin
):
def
get_form_kwargs
(
self
):
def
get_form_kwargs
(
self
):
val
=
super
(
FormOperationMixin
,
self
)
.
get_form_kwargs
()
val
=
super
(
Request
FormOperationMixin
,
self
)
.
get_form_kwargs
()
val
.
update
({
'request'
:
self
.
request
})
val
.
update
({
'request'
:
self
.
request
})
return
val
return
val
...
...
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