comparison oembed/admin.py @ 581:ee87ea74d46b

For Django 1.4, rearranged project structure for new manage.py.
author Brian Neal <bgneal@gmail.com>
date Sat, 05 May 2012 17:10:48 -0500
parents gpp/oembed/admin.py@8fd4984d5c3b
children
comparison
equal deleted inserted replaced
580:c525f3e0b5d0 581:ee87ea74d46b
1 """
2 Admin site definitions for the oembed application.
3 """
4 from django.contrib import admin
5
6 from oembed.models import Provider
7 from oembed.models import Oembed
8
9
10 class ProviderAdmin(admin.ModelAdmin):
11 list_display = ('name', 'api_endpoint', 'format')
12 list_filter = ('format', )
13 search_fields = ('name', )
14
15
16 class OembedAdmin(admin.ModelAdmin):
17 date_hierarchy = 'date_added'
18 list_display = ('__unicode__', 'type', 'url', 'date_added')
19 list_filter = ('type', )
20 search_fields = ('title', )
21
22
23 admin.site.register(Provider, ProviderAdmin)
24 admin.site.register(Oembed, OembedAdmin)