]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blobdiff - sommitrealweird/photo/admin.py
Changes to make it work with django 1.11 and python3
[sommitrealweird.git] / sommitrealweird / photo / admin.py
index 90c48b217b4937dac9d3e782f9709c3b2b55b5a7..5a7ae2fb07c78ecf1919a5a3e6a84130eb21ba1f 100644 (file)
@@ -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)