From a4a3511c5623870eb0beda8baa96a3e68497bbd2 Mon Sep 17 00:00:00 2001 From: Iwo Herka Date: Fri, 1 Jun 2018 14:36:46 +0200 Subject: [PATCH] Add docstring for the EavConfig (#5) --- eav/registry.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/eav/registry.py b/eav/registry.py index c987e0d..7471090 100644 --- a/eav/registry.py +++ b/eav/registry.py @@ -19,8 +19,21 @@ from .models import Attribute, Entity, Value class EavConfig(object): ''' - The default EevConfig class used if it is not overriden on registration. + The default EavConfig class used if it is not overriden on registration. This is where all the default eav attribute names are defined. + + Available options are as follows: + 1. manager_attr - Specifies manager name. Used to refer to the + manager from Entity class, "objects" by default. + 2. manager_only - Specifies whether signals and generic relation should + be setup for the registered model. + 3. eav_attr - Named of the Entity toolkit instance on the registered + model instance. "eav" by default. See attach_eav_attr. + 4. generic_relation_attr - Name of the GenericRelation to Value + objects. "eav_values" by default. + 5. generic_relation_related_name - Name of the related name for + GenericRelation from Entity to Value. None by default. Therefore, + if not overridden, it is not possible to query Values by Entities. ''' manager_attr = 'objects'