]> git.sommitrealweird.co.uk Git - sommitrealweird.git/commitdiff
Do some ordering in the admin interface.
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Sun, 8 Nov 2009 19:34:23 +0000 (19:34 +0000)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Sun, 8 Nov 2009 19:34:23 +0000 (19:34 +0000)
sommitrealweird/photo/admin.py

index 90c48b217b4937dac9d3e782f9709c3b2b55b5a7..d45b4c115d71ca1bff71dc57ccadf29ca6b56ae1 100644 (file)
@@ -3,6 +3,10 @@ from django.contrib import admin
 
 class AlbumAdmin(admin.ModelAdmin):
     prepopulated_fields = { "slug": ("name",) }
+    ordering = ( 'name', )
+
+class PhotoAdmin(admin.PhotoAdmin):
+    ordering = ( 'image', )
 
 admin.site.register(Album, AlbumAdmin)
-admin.site.register(Photo)
+admin.site.register(Photo, PhotoAdmin)