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
piks3l
Respect My Net
Commits
9c0c6d9e
Commit
9c0c6d9e
authored
Sep 26, 2011
by
stef
Browse files
[enh] improved admin listing for objects
parent
415de95d
Changes
1
Hide whitespace changes
Inline
Side-by-side
bt/admin.py
View file @
9c0c6d9e
...
...
@@ -2,19 +2,22 @@ from django.contrib import admin
from
bt
import
models
class
ViolationAdmin
(
admin
.
ModelAdmin
):
pass
list_display
=
(
'country'
,
'operator'
,
'contract'
,
'resource_name'
,
'media'
,
'activationid'
)
list_filter
=
(
'operator'
,
'contract'
,
'resource_name'
,
'media'
,
'country'
)
admin
.
site
.
register
(
models
.
Violation
,
ViolationAdmin
)
class
CommentAdmin
(
admin
.
ModelAdmin
):
pass
list_display
=
(
'violation'
,
'submitter_name'
,
'comment'
)
list_filter
=
(
'violation'
,
'submitter_name'
)
admin
.
site
.
register
(
models
.
Comment
,
CommentAdmin
)
class
AttachmentAdmin
(
admin
.
ModelAdmin
):
pass
list_display
=
(
'name'
,
'comment'
)
admin
.
site
.
register
(
models
.
Attachment
,
AttachmentAdmin
)
class
ConfirmationAdmin
(
admin
.
ModelAdmin
):
pass
list_display
=
(
'violation'
,
'key'
)
list_filter
=
(
'violation__operator'
,
'violation__contract'
,
'violation__resource_name'
,
'violation__media'
,
'violation__country'
)
admin
.
site
.
register
(
models
.
Confirmation
,
ConfirmationAdmin
)
class
FeaturedCaseAdmin
(
admin
.
ModelAdmin
):
...
...
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