From 54fbb09e89d04b15b8eb38ec5af85263f7e4eb5b Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Fri, 23 Feb 2024 09:09:31 +0100 Subject: [PATCH] docs(generic): add documentation about `GenericModel` --- docs/source/customization.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/source/customization.rst b/docs/source/customization.rst index bf700ff11..e52f60224 100644 --- a/docs/source/customization.rst +++ b/docs/source/customization.rst @@ -1,6 +1,21 @@ Customization ============= +The core of the logic described here is based on the :mod:`apis_core.generic`. +It provides generic CRUD views and API views for all models that are configured +to use it. To make a model use the generic functionality, it has to inherit from +:class:`apis_core.generic.abc.GenericModel`. +In standard APIS those models are + +* :class:`apis_core.apis_metainfo.models.RootObject` +* :class:`apis_core.apis_metainfo.models.Uri` +* :class:`apis_core.apis_relations.models.Triple` +* :class:`apis_core.collections.models.SkosCollection` +* :class:`apis_core.collections.models.SkosCollectionContentObject` + +If you want to use the generic app for your own model, simple make your model +inherit from :class:`apis_core.generic.abc.GenericModel`. + List views ----------