annotate 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 |
rev |
line source |
bgneal@820
|
1 """Admin definitions for the bandmap application.
|
bgneal@820
|
2
|
bgneal@820
|
3 """
|
bgneal@820
|
4 from django.contrib import admin
|
bgneal@820
|
5
|
bgneal@820
|
6 from bandmap.models import BandEntry
|
bgneal@820
|
7
|
bgneal@820
|
8
|
bgneal@820
|
9 class BandEntryAdmin(admin.ModelAdmin):
|
bgneal@820
|
10 list_display = ['name', 'date_submitted', 'date_approved', 'is_active',
|
bgneal@820
|
11 'is_approved']
|
bgneal@820
|
12 date_hierarchy = 'date_submitted'
|
bgneal@820
|
13 list_filter = ['date_submitted', 'is_active', 'is_approved']
|
bgneal@820
|
14 readonly_fields = ['lat', 'lon']
|
bgneal@820
|
15 search_fields = ['name', 'location', 'note']
|
bgneal@820
|
16 raw_id_fields = ['user']
|
bgneal@820
|
17
|
bgneal@820
|
18 admin.site.register(BandEntry, BandEntryAdmin)
|