1 from models import Album, Photo
2 from django.contrib import admin
4 class AlbumAdmin(admin.ModelAdmin):
5 prepopulated_fields = { "slug": ("name",) }
8 class PhotoAdmin(admin.PhotoAdmin):
9 ordering = ( 'image', )
11 admin.site.register(Album, AlbumAdmin)
12 admin.site.register(Photo, PhotoAdmin)