comparison bandmap/admin.py @ 838:f31168465953

Bandmap: make lat/lon editable for tweaking location markers. Don't cache band results in debug mode.
author Brian Neal <bgneal@gmail.com>
date Sat, 04 Oct 2014 16:40:17 -0500
parents 89a3a6433f6f
children 09ed84a7394c
comparison
equal deleted inserted replaced
837:234726f5a47a 838:f31168465953
16 class BandEntryAdmin(admin.ModelAdmin): 16 class BandEntryAdmin(admin.ModelAdmin):
17 list_display = ['name', 'date_submitted', 'location', 'lat', 'lon', 17 list_display = ['name', 'date_submitted', 'location', 'lat', 'lon',
18 'is_active', 'is_approved'] 18 'is_active', 'is_approved']
19 date_hierarchy = 'date_submitted' 19 date_hierarchy = 'date_submitted'
20 list_filter = ['date_submitted', 'is_active', 'is_approved'] 20 list_filter = ['date_submitted', 'is_active', 'is_approved']
21 readonly_fields = ['lat', 'lon'] 21 list_editable = ['lat', 'lon']
22 search_fields = ['name', 'location', 'note'] 22 search_fields = ['name', 'location', 'note']
23 raw_id_fields = ['user'] 23 raw_id_fields = ['user']
24 actions = ['update_location', 'approve_bands'] 24 actions = ['update_location', 'approve_bands']
25 25
26 def approve_bands(self, request, qs): 26 def approve_bands(self, request, qs):