d569be80b3
* refactors Models and attributes
65 lines
1.3 KiB
Python
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)
|