* adds rendering for detail view * adds new includable html snippet for parcel rendering * refactors generic includables in konova/ app into konova/templates/includes/... * fixes bug where parcels have been reused from the database due to wrong model structure * adds get_underlying_parcels() for Geometry model * adds get_underlying_parcels() for GeoReferencedMixin models * fixes bug where missing geometry would lead to an error during geometry conflict check * removes unused wfs attribute from AbstractWFSFetcher * adds/updates translations
78 lines
1.5 KiB
Python
78 lines
1.5 KiB
Python
"""
|
|
Author: Michel Peltriaux
|
|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
|
Contact: michel.peltriaux@sgdnord.rlp.de
|
|
Created on: 22.07.21
|
|
|
|
"""
|
|
from django.contrib import admin
|
|
|
|
from konova.models import Geometry, Deadline, GeometryConflict, Parcel, District
|
|
|
|
|
|
class GeometryAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"created",
|
|
]
|
|
|
|
|
|
class ParcelAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"gmrkng",
|
|
"flr",
|
|
"flrstck_nnr",
|
|
"flrstck_zhlr",
|
|
"updated_on",
|
|
]
|
|
|
|
|
|
class DistrictAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"gmnd",
|
|
"krs",
|
|
]
|
|
|
|
|
|
class GeometryConflictAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"conflicting_geometry",
|
|
"affected_geometry",
|
|
"detected_on",
|
|
]
|
|
|
|
|
|
class AbstractDocumentAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"title",
|
|
"comment",
|
|
"created",
|
|
]
|
|
|
|
|
|
class DeadlineAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"type",
|
|
"date",
|
|
"comment",
|
|
]
|
|
|
|
|
|
class BaseObjectAdmin(admin.ModelAdmin):
|
|
readonly_fields = [
|
|
"modified",
|
|
"deleted",
|
|
"created",
|
|
]
|
|
|
|
|
|
admin.site.register(Geometry, GeometryAdmin)
|
|
admin.site.register(Parcel, ParcelAdmin)
|
|
admin.site.register(District, DistrictAdmin)
|
|
admin.site.register(GeometryConflict, GeometryConflictAdmin)
|
|
admin.site.register(Deadline, DeadlineAdmin)
|