comparison bandmap/admin.py @ 834:89a3a6433f6f

Bandmap admin tweaks: display lat/lon. Admin dashboard link takes you to unapproved entries.
author Brian Neal <bgneal@gmail.com>
date Tue, 30 Sep 2014 19:05:42 -0500
parents b9973588af28
children f31168465953
comparison
equal deleted inserted replaced
833:497c720f9d0d 834:89a3a6433f6f
12 from bandmap.models import BandEntry 12 from bandmap.models import BandEntry
13 import bio.badges 13 import bio.badges
14 14
15 15
16 class BandEntryAdmin(admin.ModelAdmin): 16 class BandEntryAdmin(admin.ModelAdmin):
17 list_display = ['name', 'date_submitted', 'location', 'is_active', 17 list_display = ['name', 'date_submitted', 'location', 'lat', 'lon',
18 '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 readonly_fields = ['lat', 'lon']
22 search_fields = ['name', 'location', 'note'] 22 search_fields = ['name', 'location', 'note']
23 raw_id_fields = ['user'] 23 raw_id_fields = ['user']