konova/compensation/admin.py

66 lines
1.4 KiB
Python
Raw Normal View History

2021-07-01 13:36:07 +02:00
from django.contrib import admin
from compensation.models import Compensation, CompensationAction, CompensationState, Payment, \
EcoAccountDeduction, EcoAccount
from konova.admin import BaseObjectAdmin
2021-07-01 13:36:07 +02:00
class CompensationStateAdmin(admin.ModelAdmin):
list_display = [
"id",
"biotope_type",
2021-07-01 15:08:22 +02:00
"surface",
2021-07-01 13:36:07 +02:00
]
class CompensationActionAdmin(admin.ModelAdmin):
list_display = [
"id",
"action_type",
"amount",
"unit",
"comment",
2021-07-01 13:36:07 +02:00
]
class CompensationAdmin(BaseObjectAdmin):
2021-07-01 13:36:07 +02:00
list_display = [
"id",
"identifier",
"title",
"created",
2021-07-01 13:36:07 +02:00
]
class EcoAccountAdmin(admin.ModelAdmin):
list_display = [
"id",
"identifier",
"title",
]
class PaymentAdmin(admin.ModelAdmin):
list_display = [
"id",
"amount",
"due_on",
]
2021-07-01 13:36:07 +02:00
class EcoAccountDeductionAdmin(admin.ModelAdmin):
list_display = [
"id",
"account",
"intervention",
"surface",
]
2021-07-01 13:36:07 +02:00
admin.site.register(Compensation, CompensationAdmin)
admin.site.register(Payment, PaymentAdmin)
2021-07-01 13:36:07 +02:00
admin.site.register(CompensationAction, CompensationActionAdmin)
admin.site.register(CompensationState, CompensationStateAdmin)
admin.site.register(EcoAccount, EcoAccountAdmin)
admin.site.register(EcoAccountDeduction, EcoAccountDeductionAdmin)