Source

copelco / lib / copelco / apps / flickr / admin.py

Full commit
from django.contrib import admin

from copelco.apps.flickr import models as flickr


class UserAdmin(admin.ModelAdmin):
	list_display = ('username', 'nsid')
admin.site.register(flickr.User, UserAdmin)


class PhotoAdmin(admin.ModelAdmin):
	list_display = ('id', 'title', 'date_uploaded', 'date_taken',
	                'date_synced', 'user')
	date_hierarchy = 'date_uploaded'
	list_filter = ('user', 'date_taken', 'date_synced')
	ordering = ('-date_uploaded',)
	search_fields = ('title', 'user__username', 'user__nsid')
admin.site.register(flickr.Photo, PhotoAdmin)


class PhotoSizeAdmin(admin.ModelAdmin):
	list_display = ('id', 'type', 'photo', 'width', 'height')
	list_filter = ('type',)
	ordering = ('-photo__date_uploaded',)
	search_fields = ('photo__title', 'heigh', 'width')
admin.site.register(flickr.PhotoSize, PhotoSizeAdmin)