add new pydantic-based plugin system

This commit is contained in:
Nick Sweeting 2024-05-17 20:13:54 -07:00
parent e4176dbf7a
commit 48becde9b4
No known key found for this signature in database
33 changed files with 2280 additions and 4 deletions

View file

@ -0,0 +1,26 @@
# from django.contrib import admin
# from django import forms
# from django_jsonform.widgets import JSONFormWidget
# from django_pydantic_field.v2.fields import PydanticSchemaField
# from .models import CustomPlugin
# class PluginForm(forms.ModelForm):
# class Meta:
# model = CustomPlugin
# fields = '__all__'
# widgets = {
# 'items': JSONFormWidget(schema=PluginSchema),
# }
# class PluginAdmin(admin.ModelAdmin):
# formfield_overrides = {
# PydanticSchemaField: {"widget": JSONFormWidget},
# }
# form = PluginForm