2889b10e0d
* adds help texts to add payment form * adds removing button for payments * refactors user fetching into BaseForm * adds generic RemoveModalForm which is intended to be used for every modal form which shall remove something * adds translations * removes unused html * prepares payment amount field to be able to process german inputs like '1.000,50' which is not the international default
55 lines
1.2 KiB
Python
55 lines
1.2 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",
|
|
"created_by",
|
|
"created_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)
|