konova/compensation/admin.py
mpeltriaux f4541abf20 #50 Overlaying geometries
* refactors geometry field into GeoReferencedMixin, holding more handy methods and used in all models, formerly holding the geometry field
* refactors backend admin configuration, so modified, deleted and created are not editable in the backend which also skips loading of all possible choices
* fixes typo in sanitize_db command
* introduces GeometryConflict model, holding a link between two geometries, where one overlaps the other
* adds first (WIP) messages into detail views of ema and intervention for test purposes
2021-12-15 13:59:52 +01:00

66 lines
1.4 KiB
Python

from django.contrib import admin
from compensation.models import Compensation, CompensationAction, CompensationState, Payment, \
EcoAccountDeduction, EcoAccount
from konova.admin import BaseObjectAdmin
class CompensationStateAdmin(admin.ModelAdmin):
list_display = [
"id",
"biotope_type",
"surface",
]
class CompensationActionAdmin(admin.ModelAdmin):
list_display = [
"id",
"action_type",
"amount",
"unit",
"comment",
]
class CompensationAdmin(BaseObjectAdmin):
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)