|
# -*- coding: utf-8 -*-
from django.contrib import admin
from django_admin import ReadOnlyModelAdmin
from logs.models import MchInfoEncryptLogInfo, MchLogInfo
class MchInfoEncryptLogInfoAdmin(ReadOnlyModelAdmin, admin.ModelAdmin):
list_display = ('plaintext', 'alg', 'ciphertext', 'brand_pk', 'model_pk', 'distributor_pk', 'sn', 'operator_id', 'status', 'created_at', 'updated_at')
list_filter = ('alg', 'brand_pk', 'model_pk', 'distributor_pk', 'operator_id', 'status')
class MchLogInfoAdmin(ReadOnlyModelAdmin, admin.ModelAdmin):
list_display = ('log_id', 'log_file', 'operator_id', 'app_version', 'status', 'created_at', 'updated_at')
list_filter = ('operator_id', 'app_version', 'status')
search_fields = ('operator_id', 'app_version')
admin.site.register(MchLogInfo, MchLogInfoAdmin)
admin.site.register(MchInfoEncryptLogInfo, MchInfoEncryptLogInfoAdmin)
|