Mercurial > public > bravenewsurf
annotate bns_website/bands/admin.py @ 6:48ff23eab86a
Enabled the admin. Created a "bands" app with a band model.
Created a generic view to display the bands.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 29 Oct 2011 17:11:58 -0500 |
parents | |
children | 2de51cc51d3a |
rev | line source |
---|---|
bgneal@6 | 1 """ |
bgneal@6 | 2 Automatic admin definitions for the models in the bands application. |
bgneal@6 | 3 |
bgneal@6 | 4 """ |
bgneal@6 | 5 from django.contrib import admin |
bgneal@6 | 6 from bands.models import Band |
bgneal@6 | 7 |
bgneal@6 | 8 |
bgneal@6 | 9 class BandAdmin(admin.ModelAdmin): |
bgneal@6 | 10 list_display = ['name', 'url', 'order'] |
bgneal@6 | 11 list_editable = ['order'] |
bgneal@6 | 12 |
bgneal@6 | 13 |
bgneal@6 | 14 admin.site.register(Band, BandAdmin) |