0.0.36 events admin show
This commit is contained in:
@@ -4,8 +4,21 @@ from django.contrib import admin
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
# from nested_inline.admin import NestedStackedInline, NestedTabularInline, NestedModelAdmin, NestedInline
|
||||
from super_inlines.admin import SuperInlineModelAdmin, SuperModelAdmin
|
||||
from django.contrib.admin.models import LogEntry
|
||||
|
||||
|
||||
class LogEntryAdmin(admin.ModelAdmin):
|
||||
list_display = (
|
||||
'__str__', 'action_time', 'user', 'content_type', 'object_id', 'object_repr', 'action_flag', 'change_message'
|
||||
)
|
||||
list_filter = ('content_type', 'action_flag')
|
||||
search_fields = ['user__username', 'change_message', 'object_id']
|
||||
date_hierarchy = 'action_time'
|
||||
|
||||
def has_delete_permission(self, request, obj=None):
|
||||
return False
|
||||
|
||||
admin.site.register(LogEntry, LogEntryAdmin)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user