make id fields in plugins read_only

Fixes #2305
This commit is contained in:
Matthias 2021-11-13 23:40:14 +01:00
parent b79f0052a4
commit 11c3ac8bf8
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -6,4 +6,9 @@ from django.contrib import admin
import plugin.models as models import plugin.models as models
admin.site.register(models.PluginConfig, admin.ModelAdmin) class PluginConfigAdmin(admin.ModelAdmin):
"""Custom admin with restricted id fields"""
readonly_fields = ["key", "name", ]
admin.site.register(models.PluginConfig, PluginConfigAdmin)