konova/compensation/admin.py
mipel 93c02a72ca EcoAccount index
* renames eco_withdraws to withdraws
* adds EcoAccountTableFilter
* changes percentage withdraw to surface withdraw --> renames amount to surface
* updates EcoAccountTable
  * adds column for rendering rest of available account using a progress bar
* adds progressbar.html to konova/custom_widgets
* adds/updates translations
2021-08-09 14:16:54 +02:00

65 lines
1.3 KiB
Python

from django.contrib import admin
from compensation.models import Compensation, CompensationAction, CompensationState, Payment, \
EcoAccountWithdraw, 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 EcoAccountWithdrawAdmin(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(EcoAccountWithdraw, EcoAccountWithdrawAdmin)