konova/compensation/admin.py

55 lines
1.2 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, CompensationControl, Payment
2021-07-01 13:36:07 +02:00
class CompensationControlAdmin(admin.ModelAdmin):
list_display = [
"id",
"type",
"deadline",
"expected_result",
"by_authority",
]
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",
"control",
]
class CompensationAdmin(admin.ModelAdmin):
list_display = [
"id",
"created_on",
]
class PaymentAdmin(admin.ModelAdmin):
list_display = [
"id",
"amount",
"due_on",
"created_by",
"created_on",
]
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(CompensationControl, CompensationControlAdmin)