Add admin for NotificationUserSetting

This commit is contained in:
Matthias 2022-05-04 17:39:37 +02:00
parent 34855bbb37
commit 0ff407348d
No known key found for this signature in database
GPG Key ID: AB6D0E6C4CB65093

View File

@ -70,4 +70,19 @@ class PluginConfigAdmin(admin.ModelAdmin):
inlines = [PluginSettingInline, ]
class NotificationUserSettingAdmin(admin.ModelAdmin):
"""
Admin class for NotificationUserSetting
"""
model = models.NotificationUserSetting
read_only_fields = [
'key',
]
def has_add_permission(self, request):
return False
admin.site.register(models.PluginConfig, PluginConfigAdmin)
admin.site.register(models.NotificationUserSetting, NotificationUserSettingAdmin)