from django.contrib import admin from django.contrib.gis.admin import OSMGeoAdmin from birds.models import BirdSighting, BirdClass, Bird class BirdClassAdmin(admin.ModelAdmin): list_display = ('common_name', 'scientific_name',) class BirdAdmin(admin.ModelAdmin): list_display = ('pk','common_name', 'scientific_name','code','bird_class') class BirdSightingAdmin(OSMGeoAdmin): list_display = ('bird', 'location',) list_filter = ('location',) #options for OSM map Using custom ESRI topo map default_lon = -9285175 default_lat = 4025046 default_zoom = 6 units = True scrollable = False map_width = 700 map_height = 425 map_template = 'gis/admin/osm.html' admin.site.register(BirdSighting, BirdSightingAdmin) admin.site.register(BirdClass, BirdClassAdmin) admin.site.register(Bird, BirdAdmin)