Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
Respect My Net
Commits
2f87dbee
Commit
2f87dbee
authored
Nov 19, 2011
by
stef
Browse files
[enh] included descriptions of reports in the admin if
parent
526bd0e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
bt/admin.py
View file @
2f87dbee
from
django.contrib
import
admin
from
bt
import
models
from
django.contrib.comments.models
import
Comment
as
DComment
from
django.contrib.contenttypes
import
generic
class
CommentInline
(
admin
.
TabularInline
):
model
=
models
.
Comment
max_num
=
1
class
ViolationAdmin
(
admin
.
ModelAdmin
):
list_display
=
(
'state'
,
'country'
,
'operator'
,
'contract'
,
'resource_name'
,
'media'
,
'activationid'
)
list_filter
=
(
'state'
,
'operator'
,
'contract'
,
'resource_name'
,
'media'
,
'country'
)
inlines
=
[
CommentInline
,
]
admin
.
site
.
register
(
models
.
Violation
,
ViolationAdmin
)
class
CommentAdmin
(
admin
.
ModelAdmin
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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