]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blob - sommitrealweird/photo/admin.py
fix: quick and dirty update to django 4.2
[sommitrealweird.git] / sommitrealweird / photo / admin.py
1 from photo.models import Album, Photo
2 from django.contrib import admin
3
4 class AlbumAdmin(admin.ModelAdmin):
5     prepopulated_fields = { "slug": ("name",) }
6     ordering = ( 'name', )
7
8 class PhotoAdmin(admin.ModelAdmin):
9     ordering = ( 'image', )
10
11 admin.site.register(Album, AlbumAdmin)
12 admin.site.register(Photo, PhotoAdmin)