Add public link filter to Gallery admin
This commit is contained in:
parent
8458182990
commit
ddced4e2bc
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
# 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
|
||||
|
|
@ -10,7 +11,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"]
|
||||
list_filter = ["date_start", "tags", ("public_token", EmptyFieldListFilter)]
|
||||
date_hierarchy = "date_start"
|
||||
prepopulated_fields = {"slug": ("title",)}
|
||||
model = Gallery
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue