X-Git-Url: https://git.sommitrealweird.co.uk/sommitrealweird.git/blobdiff_plain/d82db041f520a51eccee6788ebc3a494e2a4280f..4c8cb8b77590e3bbccb1fdf8dc05094b683a5a14:/sommitrealweird/photo/admin.py diff --git a/sommitrealweird/photo/admin.py b/sommitrealweird/photo/admin.py index 90c48b2..5a7ae2f 100644 --- a/sommitrealweird/photo/admin.py +++ b/sommitrealweird/photo/admin.py @@ -1,8 +1,12 @@ -from models import Album, Photo +from photo.models import Album, Photo from django.contrib import admin class AlbumAdmin(admin.ModelAdmin): prepopulated_fields = { "slug": ("name",) } + ordering = ( 'name', ) + +class PhotoAdmin(admin.ModelAdmin): + ordering = ( 'image', ) admin.site.register(Album, AlbumAdmin) -admin.site.register(Photo) +admin.site.register(Photo, PhotoAdmin)