Mercurial > public > sg101
comparison 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 |
comparison
equal
deleted
inserted
replaced
819:38db6ec61af3 | 820:9a0df7bd2409 |
---|---|
1 """Admin definitions for the bandmap application. | |
2 | |
3 """ | |
4 from django.contrib import admin | |
5 | |
6 from bandmap.models import BandEntry | |
7 | |
8 | |
9 class BandEntryAdmin(admin.ModelAdmin): | |
10 list_display = ['name', 'date_submitted', 'date_approved', 'is_active', | |
11 'is_approved'] | |
12 date_hierarchy = 'date_submitted' | |
13 list_filter = ['date_submitted', 'is_active', 'is_approved'] | |
14 readonly_fields = ['lat', 'lon'] | |
15 search_fields = ['name', 'location', 'note'] | |
16 raw_id_fields = ['user'] | |
17 | |
18 admin.site.register(BandEntry, BandEntryAdmin) |