annotate gpp/oembed/admin.py @ 490:f0f3966ea44f
For #233, switched to asynchronous loading of the social media sharing javascript. Also switched to Facebook's javascript SDK instead of using an iframe for the like/share button.
author |
Brian Neal <bgneal@gmail.com> |
date |
Thu, 20 Oct 2011 00:36:37 +0000 |
parents |
8fd4984d5c3b |
children |
|
rev |
line source |
bgneal@285
|
1 """
|
bgneal@285
|
2 Admin site definitions for the oembed application.
|
bgneal@285
|
3 """
|
bgneal@285
|
4 from django.contrib import admin
|
bgneal@285
|
5
|
bgneal@285
|
6 from oembed.models import Provider
|
bgneal@285
|
7 from oembed.models import Oembed
|
bgneal@285
|
8
|
bgneal@285
|
9
|
bgneal@285
|
10 class ProviderAdmin(admin.ModelAdmin):
|
bgneal@285
|
11 list_display = ('name', 'api_endpoint', 'format')
|
bgneal@285
|
12 list_filter = ('format', )
|
bgneal@285
|
13 search_fields = ('name', )
|
bgneal@285
|
14
|
bgneal@285
|
15
|
bgneal@285
|
16 class OembedAdmin(admin.ModelAdmin):
|
bgneal@285
|
17 date_hierarchy = 'date_added'
|
bgneal@285
|
18 list_display = ('__unicode__', 'type', 'url', 'date_added')
|
bgneal@285
|
19 list_filter = ('type', )
|
bgneal@285
|
20 search_fields = ('title', )
|
bgneal@285
|
21
|
bgneal@285
|
22
|
bgneal@285
|
23 admin.site.register(Provider, ProviderAdmin)
|
bgneal@285
|
24 admin.site.register(Oembed, OembedAdmin)
|