konova/compensation/admin.py
mipel 50a3e6a21c Withdraw to deduct
* refactors Models and attributes
2021-08-30 11:34:35 +02:00

65 lines
1.3 KiB
Python

from django.contrib import admin
from compensation.models import Compensation, CompensationAction, CompensationState, Payment, \
EcoAccountDeduction, EcoAccount
class CompensationStateAdmin(admin.ModelAdmin):
list_display = [
"id",
"biotope_type",
"surface",
]
class CompensationActionAdmin(admin.ModelAdmin):
list_display = [
"id",
"action_type",
"amount",
"unit",
"comment",
]
class CompensationAdmin(admin.ModelAdmin):
list_display = [
"id",
"identifier",
"title",
"created",
]
class EcoAccountAdmin(admin.ModelAdmin):
list_display = [
"id",
"identifier",
"title",
]
class PaymentAdmin(admin.ModelAdmin):
list_display = [
"id",
"amount",
"due_on",
]
class EcoAccountDeductionAdmin(admin.ModelAdmin):
list_display = [
"id",
"account",
"intervention",
"surface",
]
admin.site.register(Compensation, CompensationAdmin)
admin.site.register(Payment, PaymentAdmin)
admin.site.register(CompensationAction, CompensationActionAdmin)
admin.site.register(CompensationState, CompensationStateAdmin)
admin.site.register(EcoAccount, EcoAccountAdmin)
admin.site.register(EcoAccountDeduction, EcoAccountDeductionAdmin)