From f2dedecf621902515d68eb84dfd2c8da036c578b Mon Sep 17 00:00:00 2001 From: Brett Parker Date: Sun, 8 Nov 2009 19:34:23 +0000 Subject: [PATCH 1/1] Do some ordering in the admin interface. --- sommitrealweird/photo/admin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sommitrealweird/photo/admin.py b/sommitrealweird/photo/admin.py index 90c48b2..d45b4c1 100644 --- a/sommitrealweird/photo/admin.py +++ b/sommitrealweird/photo/admin.py @@ -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) -- 2.39.5