16 lines
758 B
Python
Executable file
16 lines
758 B
Python
Executable file
from django.contrib import admin
|
|
from .models import Transaction, Account, Wallet
|
|
|
|
class TransactionAdmin(admin.ModelAdmin):
|
|
list_display = ['uuid', 'amount', 'created_at', 'updated_at', 'payer', 'payer_type', 'payee', 'payee_type', 'state', 'application']
|
|
search_fields = ['uuid', 'created_at', 'updated_at', 'payer_account__owner_uuid', 'payee_account__owner_uuid', 'application__uuid']
|
|
list_filter = ['state']
|
|
|
|
class AccountAdmin(admin.ModelAdmin):
|
|
list_display = ['uuid', 'owner_uuid', 'wallet', 'owner_type', 'balance',]
|
|
search_fields = ['uuid', 'owner_uuid']
|
|
list_filter = ['wallet__label', 'owner_type']
|
|
|
|
admin.site.register(Transaction, TransactionAdmin)
|
|
admin.site.register(Account, AccountAdmin)
|
|
admin.site.register(Wallet)
|