comparison mp3/admin.py @ 71:e2868ad47a1e

For Django 1.4, using the new manage.py.
author Brian Neal <bgneal@gmail.com>
date Sat, 14 Apr 2012 16:40:29 -0500
parents madeira/mp3/admin.py@b8a71c767dc0
children
comparison
equal deleted inserted replaced
70:f26cdda0ad8b 71:e2868ad47a1e
1 """
2 Automatic admin definitions for the models in the mp3 application.
3
4 """
5 from django.contrib import admin
6 from django.conf import settings
7
8 from mp3.models import Collection, Song
9
10
11 class SongInline(admin.TabularInline):
12 model = Song
13
14
15 class CollectionAdmin(admin.ModelAdmin):
16 list_filter = ['date_added']
17 list_display = ['title', 'date_added']
18 inlines = [SongInline]
19
20 class Media:
21 js = settings.THIRD_PARTY_JS['tiny_mce']
22
23
24 class SongAdmin(admin.ModelAdmin):
25 list_display = ['title', 'collection']
26
27
28 admin.site.register(Collection, CollectionAdmin)
29 admin.site.register(Song, SongAdmin)