Add more components + base for history

This commit is contained in:
2024-10-01 15:42:18 +02:00
parent fb4d566007
commit 8f9c83dc2a
38 changed files with 1374 additions and 665 deletions
+1
View File
@@ -13,5 +13,6 @@ def header_for_table(model):
"text": "Actions",
"value": "actions",
"sortable": False,
"details": False,
},
]
+3 -1
View File
@@ -25,6 +25,8 @@ class BaseQuerySet(models.QuerySet):
"editable": field.name not in self.model.Serialization.excluded_fields_edit,
"field_widget": "v-textarea",
"choices": None,
"details": True,
"dynamic_field_type": field.name in self.model.Serialization.dynamic_field_type,
}
}
@@ -48,7 +50,6 @@ class BaseQuerySet(models.QuerySet):
if field.choices:
ret[field.name].update(
text="",
field_widget="v-select",
choices=[
{
@@ -92,6 +93,7 @@ class BaseModel(models.Model):
# Exclude fields from serialization
excluded_fields = []
excluded_fields_edit = ["id", "created_at", "last_modified_at"]
dynamic_field_type = []
class Encryption:
fields = ["name", "description", "custom_identifier"]