forked from ietf-tools/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.py
More file actions
30 lines (18 loc) · 854 Bytes
/
admin.py
File metadata and controls
30 lines (18 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Copyright The IETF Trust 2011-2026, All Rights Reserved
from django.contrib import admin
from .models import DumpInfo, DirtyBits
class SaferStackedInline(admin.StackedInline):
"""StackedInline without delete by default"""
can_delete = False # no delete button
show_change_link = True # show a link to the resource (where it can be deleted)
class SaferTabularInline(admin.TabularInline):
"""TabularInline without delete by default"""
can_delete = False # no delete button
show_change_link = True # show a link to the resource (where it can be deleted)
@admin.register(DumpInfo)
class DumpInfoAdmin(admin.ModelAdmin):
list_display = ["date", "host", "tz"]
list_filter = ["date"]
@admin.register(DirtyBits)
class DirtyBitsAdmin(admin.ModelAdmin):
list_display = ["slug", "dirty_time", "processed_time"]