Files

24 lines
675 B
Python
Raw Permalink Normal View History

2025-08-27 09:55:55 +02:00
# frontend/admin.py
from django.contrib import admin
from .models import UserProfile, FAQ
@admin.register(UserProfile)
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user', 'ldap_uid', 'user_group')
search_fields = ('user__username', 'ldap_uid')
list_filter = ('user__groups',)
@admin.register(FAQ)
class FAQAdmin(admin.ModelAdmin):
list_display = ('title', 'order', 'created_at', 'updated_at')
list_filter = ('created_at',)
search_fields = ('title', 'content')
list_editable = ('order',)
ordering = ('order', 'title')
fieldsets = (
(None, {
'fields': ('title', 'content', 'order')
}),
)