24 lines
707 B
Python
24 lines
707 B
Python
from django.contrib import admin
|
|
from .models import Account, OperationCode, ServiceAccount
|
|
|
|
|
|
@admin.register(Account)
|
|
class AccountAdmin(admin.ModelAdmin):
|
|
list_display = ('uuid', 'name', 'account_type', 'created_at')
|
|
list_filter = ('account_type', 'created_at')
|
|
search_fields = ('uuid', 'name')
|
|
readonly_fields = ('uuid', 'created_at')
|
|
|
|
|
|
@admin.register(OperationCode)
|
|
class OperationCodeAdmin(admin.ModelAdmin):
|
|
list_display = ('code', 'name', 'created_at')
|
|
search_fields = ('code', 'name')
|
|
ordering = ('code',)
|
|
|
|
|
|
@admin.register(ServiceAccount)
|
|
class ServiceAccountAdmin(admin.ModelAdmin):
|
|
list_display = ('slug', 'account')
|
|
search_fields = ('slug', 'account__name')
|