Mercurial > public > sg101
diff bandmap/admin.py @ 820:9a0df7bd2409
Bandmap application work in progress.
Model defined.
Map is displaying.
Initial display of add form.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 21 Sep 2014 18:20:29 -0500 |
parents | |
children | 5892c05886a9 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bandmap/admin.py Sun Sep 21 18:20:29 2014 -0500 @@ -0,0 +1,18 @@ +"""Admin definitions for the bandmap application. + +""" +from django.contrib import admin + +from bandmap.models import BandEntry + + +class BandEntryAdmin(admin.ModelAdmin): + list_display = ['name', 'date_submitted', 'date_approved', 'is_active', + 'is_approved'] + date_hierarchy = 'date_submitted' + list_filter = ['date_submitted', 'is_active', 'is_approved'] + readonly_fields = ['lat', 'lon'] + search_fields = ['name', 'location', 'note'] + raw_id_fields = ['user'] + +admin.site.register(BandEntry, BandEntryAdmin)