Skip to content

Commit 83c546b

Browse files
committed
Django admin usability improvements
Copied from PR #63 by @bryan-brancotte.
1 parent da479cf commit 83c546b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cspreports/admin.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66

77

88
class CSPReportAdmin(admin.ModelAdmin):
9-
list_display = ("id", "created", "document_uri", "blocked_uri")
9+
list_display = ("id", "created", "document_uri", "blocked_uri", "is_valid")
1010
fields = ("created", "modified", "json_as_html")
1111
readonly_fields = ("created", "modified", "json_as_html")
12+
search_fields = ("json",)
13+
list_filter = ("is_valid",)
14+
date_hierarchy = "created"
1215

1316
def json_as_html(self, instance):
1417
return "<br />" + instance.json_as_html()

0 commit comments

Comments
 (0)