konova/compensation/admin.py
mipel 8f0db2ae3e Linkage improvement
* adds linking to submenus
* adds PaymentAdmin
* adds Meta class inheritance for tables
2021-07-21 14:17:18 +02:00

53 lines
1.1 KiB
Python

from django.contrib import admin
from compensation.models import Compensation, CompensationAction, CompensationState, CompensationControl, Payment
class CompensationControlAdmin(admin.ModelAdmin):
list_display = [
"id",
"type",
"deadline",
"expected_result",
"by_authority",
]
class CompensationStateAdmin(admin.ModelAdmin):
list_display = [
"id",
"biotope_type",
"surface",
]
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"
]
admin.site.register(Compensation, CompensationAdmin)
admin.site.register(Payment, PaymentAdmin)
admin.site.register(CompensationAction, CompensationActionAdmin)
admin.site.register(CompensationState, CompensationStateAdmin)
admin.site.register(CompensationControl, CompensationControlAdmin)