Добавил форму с предосмотром и редактированием
This commit is contained in:
@@ -110,7 +110,7 @@ class GeoInline(admin.StackedInline):
|
||||
fieldsets = (
|
||||
("Основная информация", {
|
||||
"fields": ("mirrors", "location", "distance_coords_kup",
|
||||
"distance_coords_valid", "distance_kup_valid", "timestamp", "comment", "id_user_add")
|
||||
"distance_coords_valid", "distance_kup_valid", "timestamp", "comment",)
|
||||
}),
|
||||
("Координаты: геолокация", {
|
||||
"fields": ("longitude_geo", "latitude_geo", "coords"),
|
||||
@@ -195,15 +195,6 @@ class ParameterAdmin(ImportExportActionModelAdmin, admin.ModelAdmin):
|
||||
"standard",
|
||||
"sigma_parameter"
|
||||
)
|
||||
# fields = ( "id_satellite",
|
||||
# "frequency",
|
||||
# "freq_range",
|
||||
# "polarization",
|
||||
# "modulation",
|
||||
# "bod_velocity",
|
||||
# "snr",
|
||||
# "standard",
|
||||
# "id_sigma_parameter")
|
||||
list_display_links = ("frequency", "id_satellite", )
|
||||
list_filter = (
|
||||
HasSigmaParameterFilter,
|
||||
@@ -309,7 +300,7 @@ class GeoAdmin(ImportExportActionModelAdmin, LeafletGeoAdmin):
|
||||
fieldsets = (
|
||||
("Основная информация", {
|
||||
"fields": ("mirrors", "location", "distance_coords_kup",
|
||||
"distance_coords_valid", "distance_kup_valid", "timestamp", "comment", "id_user_add")
|
||||
"distance_coords_valid", "distance_kup_valid", "timestamp", "comment",)
|
||||
}),
|
||||
("Координаты: геолокация", {
|
||||
"fields": ("longitude_geo", "latitude_geo", "coords"),
|
||||
@@ -337,7 +328,6 @@ class GeoAdmin(ImportExportActionModelAdmin, LeafletGeoAdmin):
|
||||
"is_average",
|
||||
("location", MultiSelectDropdownFilter),
|
||||
("timestamp", DateRangeQuickSelectListFilterBuilder()),
|
||||
("id_user_add", MultiSelectRelatedDropdownFilter),
|
||||
)
|
||||
search_fields = (
|
||||
"mirrors__name",
|
||||
@@ -346,7 +336,6 @@ class GeoAdmin(ImportExportActionModelAdmin, LeafletGeoAdmin):
|
||||
"coords_kupsat",
|
||||
"coords_valid"
|
||||
)
|
||||
list_select_related = ("id_user_add", )
|
||||
prefetch_related = ("mirrors", )
|
||||
|
||||
|
||||
@@ -467,7 +456,6 @@ class ObjectAdmin(admin.ModelAdmin):
|
||||
)
|
||||
|
||||
def get_readonly_fields(self, request, obj=None):
|
||||
# Always make these fields readonly to preserve tracking
|
||||
return self.readonly_fields
|
||||
|
||||
def save_model(self, request, obj, form, change):
|
||||
|
||||
Reference in New Issue
Block a user