Bundle trimed down alternative to photologue

This commit is contained in:
Alexandre Iooss 2022-01-30 08:20:03 +01:00
parent 2da3419b8d
commit 5368a51a76
40 changed files with 2652 additions and 70 deletions

View file

@ -2,7 +2,7 @@ from django.contrib import admin
from django.utils.translation import gettext_lazy as _
from photologue.admin import GalleryAdmin as GalleryAdminDefault
from photologue.admin import PhotoAdmin as PhotoAdminDefault
from photologue.models import Gallery, Photo, PhotoEffect, PhotoSize, Watermark
from photologue.models import Gallery, Photo
from .models import GalleryExtended, PhotoExtended
@ -18,8 +18,6 @@ class GalleryAdmin(GalleryAdminDefault):
model.
"""
inlines = [GalleryExtendedInline, ]
autocomplete_fields = ['photos', ]
search_fields = ['title', ]
class PhotoExtendedInline(admin.StackedInline):
@ -45,10 +43,5 @@ class PhotoAdmin(PhotoAdminDefault):
get_owner.short_description = _('owner')
admin.site.unregister(Gallery)
admin.site.unregister(Photo)
admin.site.unregister(PhotoEffect)
admin.site.unregister(PhotoSize)
admin.site.unregister(Watermark)
admin.site.register(Gallery, GalleryAdmin)
admin.site.register(Photo, PhotoAdmin)