Commit c42074ed authored by Baptiste Jonglez's avatar Baptiste Jonglez

Improve admin: allow to search for points, add missing fields in list view

parent ee65e93b
......@@ -24,6 +24,7 @@ class PanoramaAdmin(admin.ModelAdmin):
fields = ('name', ('image', 'image_width', 'image_height'),
'loop', ('latitude', 'longitude'), ('ground_altitude', 'height_above_ground'))
readonly_fields = ('image_width', 'image_height')
search_fields = ('name', )
actions = ('regenerate_tiles', )
def regenerate_tiles(self, request, queryset):
......@@ -37,5 +38,7 @@ class PanoramaAdmin(admin.ModelAdmin):
class ReferencePointAdmin(admin.ModelAdmin):
model = ReferencePoint
list_display = ('name', 'latitude', 'longitude', 'altitude', 'kind')
list_display = ('name', 'latitude', 'longitude', 'height_above_ground', 'altitude', 'kind')
list_filter = ('kind', )
fields = ('name', ('latitude', 'longitude'), ('ground_altitude', 'height_above_ground'), 'kind')
search_fields = ('name', )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment