Skip to content
Snippets Groups Projects
Commit 8f286ee0 authored by Alexa Valentová's avatar Alexa Valentová
Browse files

group horizontal permission filter

parent faa33a54
No related branches found
No related tags found
No related merge requests found
Pipeline #17076 passed
from django.contrib import admin from django.contrib import admin
from django.contrib.auth import admin as auth_admin
from django.contrib.auth import models as auth_models
from shared.admin import MarkdownxGuardedModelAdmin from shared.admin import MarkdownxGuardedModelAdmin
from .models import User from .models import User
class GroupAdmin(auth_admin.GroupAdmin):
filter_horizontal = ("permissions",)
list_filter = ("permissions",)
admin.site.unregister(auth_models.Group)
admin.site.register(User, MarkdownxGuardedModelAdmin) admin.site.register(User, MarkdownxGuardedModelAdmin)
admin.site.register(auth_models.Group, GroupAdmin)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment