0797a6b99f
* refactors base attributes created and deleted into UserActionLogEntry foreign keys * refactors all related queries and process logic * fixes binding_on into binding_date in intervention/detail/view.html * adds basic __str__ for some models *
76 lines
1.6 KiB
Python
76 lines
1.6 KiB
Python
from django.contrib import admin
|
|
|
|
from compensation.models import Compensation, CompensationAction, CompensationState, CompensationControl, Payment, \
|
|
EcoAccountWithdraw, EcoAccount
|
|
|
|
|
|
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",
|
|
"identifier",
|
|
"title",
|
|
"created",
|
|
]
|
|
|
|
|
|
class EcoAccountAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"identifier",
|
|
"title",
|
|
]
|
|
|
|
|
|
class PaymentAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"amount",
|
|
"due_on",
|
|
]
|
|
|
|
|
|
class EcoAccountWithdrawAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"account",
|
|
"intervention",
|
|
"amount",
|
|
]
|
|
|
|
|
|
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)
|
|
admin.site.register(EcoAccount, EcoAccountAdmin)
|
|
admin.site.register(EcoAccountWithdraw, EcoAccountWithdrawAdmin)
|