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
e64d3033
authored
Aug 27, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: use inheritance for MassOperationView.factory
parent
db560b90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
circle/dashboard/views.py
+2
-4
No files found.
circle/dashboard/views.py
View file @
e64d3033
...
...
@@ -1012,7 +1012,6 @@ def get_operations(instance, user):
class
MassOperationView
(
OperationView
):
template_name
=
'dashboard/mass-operate.html'
effect
=
"info"
@classmethod
def
get_urlname
(
cls
):
...
...
@@ -1102,10 +1101,8 @@ class MassOperationView(OperationView):
@classmethod
def
factory
(
cls
,
vm_op
,
extra_bases
=
(),
**
kwargs
):
kwargs
.
update
({
'op'
:
vm_op
.
op
,
'icon'
:
vm_op
.
icon
,
'effect'
:
vm_op
.
effect
})
return
type
(
str
(
cls
.
__name__
+
vm_op
.
op
),
tuple
(
list
(
extra_bases
)
+
[
cls
]),
kwargs
)
tuple
(
list
(
extra_bases
)
+
[
cls
,
vm_op
]),
kwargs
)
class
MassMigrationView
(
MassOperationView
):
...
...
@@ -1113,6 +1110,7 @@ class MassMigrationView(MassOperationView):
icon
=
"info"
op
=
"migrate"
icon
=
"truck"
effect
=
"info"
def
get_context_data
(
self
,
**
kwargs
):
ctx
=
super
(
MassMigrationView
,
self
)
.
get_context_data
(
**
kwargs
)
...
...
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