Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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
Commit
fe11154a
authored
Feb 13, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one: admin lists more columns
parent
01b6960b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
one/admin.py
+8
-5
No files found.
one/admin.py
View file @
fe11154a
...
@@ -47,14 +47,15 @@ submit_vm.short_description = _('Submit VM')
...
@@ -47,14 +47,15 @@ submit_vm.short_description = _('Submit VM')
class
TemplateAdmin
(
contrib
.
admin
.
ModelAdmin
):
class
TemplateAdmin
(
contrib
.
admin
.
ModelAdmin
):
model
=
models
.
Template
model
=
models
.
Template
list_display
=
(
'name'
,
'state'
,
'owner'
,
'system'
)
list_display
=
(
'name'
,
'state'
,
'owner'
,
'system'
,
'public'
)
list_filter
=
(
'owner'
,
'public'
)
class
InstanceAdmin
(
contrib
.
admin
.
ModelAdmin
):
class
InstanceAdmin
(
contrib
.
admin
.
ModelAdmin
):
model
=
models
.
Instance
model
=
models
.
Instance
actions
=
[
update_state
,
submit_vm
]
actions
=
[
update_state
,
submit_vm
]
list_display
=
[
'id'
,
'name'
,
'owner'
,
'state'
]
list_display
=
(
'id'
,
'name'
,
'owner'
,
'state'
)
readonly_fields
=
[
'ip'
,
'active_since'
,
'pw'
,
'template'
]
readonly_fields
=
(
'ip'
,
'active_since'
,
'pw'
,
'template'
)
list_filter
=
[
'owner'
,
'template'
,
'state'
]
list_filter
=
(
'owner'
,
'template'
,
'state'
)
class
DiskAdmin
(
contrib
.
admin
.
ModelAdmin
):
class
DiskAdmin
(
contrib
.
admin
.
ModelAdmin
):
model
=
models
.
Disk
model
=
models
.
Disk
...
@@ -62,6 +63,8 @@ class NetworkAdmin(contrib.admin.ModelAdmin):
...
@@ -62,6 +63,8 @@ class NetworkAdmin(contrib.admin.ModelAdmin):
model
=
models
.
Network
model
=
models
.
Network
class
ShareAdmin
(
contrib
.
admin
.
ModelAdmin
):
class
ShareAdmin
(
contrib
.
admin
.
ModelAdmin
):
model
=
models
.
Network
model
=
models
.
Network
list_filter
=
(
'group'
,
'template'
,
)
list_display
=
(
'name'
,
'owner'
,
'template'
,
'group'
,
)
contrib
.
admin
.
site
.
register
(
models
.
Template
,
TemplateAdmin
)
contrib
.
admin
.
site
.
register
(
models
.
Template
,
TemplateAdmin
)
contrib
.
admin
.
site
.
register
(
models
.
Instance
,
InstanceAdmin
)
contrib
.
admin
.
site
.
register
(
models
.
Instance
,
InstanceAdmin
)
...
...
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