Add configurable per-gallery public access
This commit is contained in:
parent
72e9344102
commit
1cdd1dce26
10 changed files with 119 additions and 45 deletions
|
|
@ -3,7 +3,6 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from django.contrib import admin
|
||||
from django.contrib.admin import EmptyFieldListFilter
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from .models import Gallery, Photo, Tag
|
||||
|
|
@ -11,7 +10,7 @@ from .models import Gallery, Photo, Tag
|
|||
|
||||
class GalleryAdmin(admin.ModelAdmin):
|
||||
list_display = ("title", "date_start", "photo_count", "get_tags")
|
||||
list_filter = ["date_start", "tags", ("public_token", EmptyFieldListFilter)]
|
||||
list_filter = ["date_start", "tags", "is_public"]
|
||||
date_hierarchy = "date_start"
|
||||
prepopulated_fields = {"slug": ("title",)}
|
||||
model = Gallery
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue