comparison gpp/oembed/admin.py @ 285:8fd4984d5c3b

This is a first rough commit for #95, adding the ability to embed YouTube videos in forum posts. Some more polish and testing needs to happen at this point. I wanted to get all these changes off my hard drive and into the repository.
author Brian Neal <bgneal@gmail.com>
date Thu, 14 Oct 2010 02:39:35 +0000
parents
children
comparison
equal deleted inserted replaced
284:df2c81f705a8 285:8fd4984d5c3b
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)