This commit is contained in:
2026-05-11 04:38:44 +03:30
parent 17628f503f
commit c2b6052e5c
69 changed files with 3073 additions and 57 deletions
+66
View File
@@ -3,7 +3,11 @@ from .models import (
AnalysisGridCell,
AnalysisGridObservation,
BlockSubdivision,
RemoteSensingClusterBlock,
RemoteSensingClusterAssignment,
RemoteSensingSubdivisionOption,
RemoteSensingSubdivisionOptionAssignment,
RemoteSensingSubdivisionOptionBlock,
RemoteSensingRun,
RemoteSensingSubdivisionResult,
SoilLocation,
@@ -121,6 +125,68 @@ class RemoteSensingSubdivisionResultAdmin(admin.ModelAdmin):
readonly_fields = ("created_at", "updated_at")
@admin.register(RemoteSensingClusterBlock)
class RemoteSensingClusterBlockAdmin(admin.ModelAdmin):
list_display = (
"uuid",
"soil_location",
"block_code",
"sub_block_code",
"cluster_label",
"cell_count",
"updated_at",
)
list_filter = ("cluster_label", "chunk_size_sqm", "created_at")
search_fields = ("uuid", "block_code", "sub_block_code", "soil_location__latitude", "soil_location__longitude")
readonly_fields = ("created_at", "updated_at")
@admin.register(RemoteSensingSubdivisionOption)
class RemoteSensingSubdivisionOptionAdmin(admin.ModelAdmin):
list_display = (
"id",
"result",
"requested_k",
"effective_cluster_count",
"is_active",
"is_recommended",
"selection_source",
"updated_at",
)
list_filter = ("is_active", "is_recommended", "selection_source", "created_at")
search_fields = ("result__block_code", "result__soil_location__latitude", "result__soil_location__longitude")
readonly_fields = ("created_at", "updated_at")
@admin.register(RemoteSensingSubdivisionOptionBlock)
class RemoteSensingSubdivisionOptionBlockAdmin(admin.ModelAdmin):
list_display = (
"id",
"option",
"cluster_label",
"sub_block_code",
"cell_count",
"updated_at",
)
list_filter = ("cluster_label", "created_at")
search_fields = ("sub_block_code", "option__result__block_code")
readonly_fields = ("created_at", "updated_at")
@admin.register(RemoteSensingSubdivisionOptionAssignment)
class RemoteSensingSubdivisionOptionAssignmentAdmin(admin.ModelAdmin):
list_display = (
"id",
"option",
"cell",
"cluster_label",
"updated_at",
)
list_filter = ("cluster_label", "created_at")
search_fields = ("cell__cell_code", "option__result__block_code")
readonly_fields = ("created_at", "updated_at")
@admin.register(RemoteSensingClusterAssignment)
class RemoteSensingClusterAssignmentAdmin(admin.ModelAdmin):
list_display = (