<commit_before>"""Simple admin registration for ``image_gallery`` models."""
from django.contrib import admin

from cms.admin.placeholderadmin import PlaceholderAdmin
from filer.admin.imageadmin import ImageAdmin

from . import models


class GalleryAdmin(PlaceholderAdmin):
    """Custom admin for the ``Gallery`` model."""
    list_display = ('title', 'date', 'location', 'folder', 'category')
    list_filter = ['category', ]


class GalleryCategoryAdmin(admin.ModelAdmin):
    """Custom admin for the ``GalleryCategory`` model."""
    list_display = ('name', 'slug')
<commit_msg>fix compatibility with django_cms 3.1<commit_after>"""Simple admin registration for ``image_gallery`` models."""
from django.contrib import admin

from cms.admin.placeholderadmin import PlaceholderAdminMixin
from filer.admin.imageadmin import ImageAdmin

from . import models


class GalleryAdmin(PlaceholderAdminMixin, admin.ModelAdmin):
    """Custom admin for the ``Gallery`` model."""
    list_display = ('title', 'date', 'location', 'folder', 'category')
    list_filter = ['category', ]


class GalleryCategoryAdmin(admin.ModelAdmin):
    """Custom admin for the ``GalleryCategory`` model."""
    list_display = ('name', 'slug')

{'fraction_non_alphanumeric': 0.13382594417077176, 'fraction_numerical': 0.0016420361247947454, 'mean_word_length': 5.553763440860215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1839756', 'n_tokens_mistral': 328, 'n_tokens_neox': 323, 'n_words': 101}