From 7633322679ae9078dacdb6821f277a7f93f640ab Mon Sep 17 00:00:00 2001
From: Renaud Le Gac <legac@cppm.in2p3.fr>
Date: Wed, 15 Apr 2015 15:41:02 +0200
Subject: [PATCH] Use the construct Attributes.

---
 modules/plugin_dbui/basesvc.py          | 3 +++
 modules/plugin_dbui/directsvc.py        | 3 +++
 modules/plugin_dbui/fieldsmodifier.py   | 4 ++++
 modules/plugin_dbui/formmodifier.py     | 5 +++++
 modules/plugin_dbui/modifier.py         | 3 +++
 modules/plugin_dbui/navtree.py          | 5 +++++
 modules/plugin_dbui/storemodifier.py    | 3 +++
 modules/plugin_dbui/viewportmodifier.py | 6 +++++-
 8 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/modules/plugin_dbui/basesvc.py b/modules/plugin_dbui/basesvc.py
index 92457709..3a3370dc 100644
--- a/modules/plugin_dbui/basesvc.py
+++ b/modules/plugin_dbui/basesvc.py
@@ -8,6 +8,9 @@ import pprint
 class BaseSvc:
     """Base class to build service.
 
+    Attributes:
+        debug (bool): activate the debug mode
+
     """
     def __init__(self):
         self.debug = False
diff --git a/modules/plugin_dbui/directsvc.py b/modules/plugin_dbui/directsvc.py
index 2e5746c8..0f1599d5 100644
--- a/modules/plugin_dbui/directsvc.py
+++ b/modules/plugin_dbui/directsvc.py
@@ -66,6 +66,9 @@ class DirectSvc(BaseSvc):
 
     In this implementation requests and response are JSON encoded.
 
+    Attributes:
+        procedures (dict):
+
     """
 
     def __init__(self):
diff --git a/modules/plugin_dbui/fieldsmodifier.py b/modules/plugin_dbui/fieldsmodifier.py
index d9014159..6409b0cc 100644
--- a/modules/plugin_dbui/fieldsmodifier.py
+++ b/modules/plugin_dbui/fieldsmodifier.py
@@ -12,6 +12,10 @@ MODIFIER_FIELDS = 'modifier_fields'
 class FieldsModifier(Modifier):
     """Modifier to customise the field widgets associated to a database table.
 
+    Attributes:
+        data.extjs_fields (dict):
+        data.composite_fields (gluon.storage.Storage):
+
     """
 
     def __init__(self, tablename):
diff --git a/modules/plugin_dbui/formmodifier.py b/modules/plugin_dbui/formmodifier.py
index 06d1a750..2fcff0c8 100644
--- a/modules/plugin_dbui/formmodifier.py
+++ b/modules/plugin_dbui/formmodifier.py
@@ -46,6 +46,11 @@ def configure_forms(db, **extjs):
 class FormModifier(Modifier):
     """Modifier to customise the form widget associated to a database table.
 
+    Attributes:
+        data.field_sets (list)
+        data.hidden_fields (list)
+        data.mapper (function)
+
     """
 
     def __init__(self, tablename):
diff --git a/modules/plugin_dbui/modifier.py b/modules/plugin_dbui/modifier.py
index 1ad69c84..551b8e49 100644
--- a/modules/plugin_dbui/modifier.py
+++ b/modules/plugin_dbui/modifier.py
@@ -12,6 +12,9 @@ MSG_INVALID_TYPE = "Invalid plugin type"
 class Modifier(object):
     """Base class to construct Modifier tools.
 
+    Attributes:
+        data (gluon.storage.Storage):
+
     """
 
     def __init__(self, dpname, tablename=None):
diff --git a/modules/plugin_dbui/navtree.py b/modules/plugin_dbui/navtree.py
index 90320721..66080d92 100644
--- a/modules/plugin_dbui/navtree.py
+++ b/modules/plugin_dbui/navtree.py
@@ -11,6 +11,11 @@ class Node(object):
     It contains children (leaves) which are associated to widgets.
     The widget will be display on the panel of the *Viewport*.
 
+    Attributes:
+        text (str)
+        children (list)
+        hidden (list)
+
     """
     def __init__(self, text):
         """Construct the node.
diff --git a/modules/plugin_dbui/storemodifier.py b/modules/plugin_dbui/storemodifier.py
index ab229c1d..d4409056 100644
--- a/modules/plugin_dbui/storemodifier.py
+++ b/modules/plugin_dbui/storemodifier.py
@@ -57,6 +57,9 @@ class AddStore(object):
 class StoreModifier(Modifier):
     """Modifier to customize the store associated to a table.
 
+    Attributes:
+        data.orderby (list):
+
     """
 
     def __init__(self, tablename):
diff --git a/modules/plugin_dbui/viewportmodifier.py b/modules/plugin_dbui/viewportmodifier.py
index 1f80c2c4..913c0b0b 100644
--- a/modules/plugin_dbui/viewportmodifier.py
+++ b/modules/plugin_dbui/viewportmodifier.py
@@ -15,6 +15,10 @@ MODIFIER_VIEWPORTS = 'modifier_viewports'
 class ViewportModifier(Modifier):
     """Modifier to customize the viewport widget of the application.
 
+    Attributes:
+        data.default (str):
+        data.nodes (list):
+
     """
 
     def __init__(self):
@@ -38,7 +42,7 @@ class ViewportModifier(Modifier):
               viewport widget.
 
             * ``nodes`` (list) list of :class:`.Node`
-            defining the navigation tree
+              defining the navigation tree
 
         """
         Modifier.__init__(self, MODIFIER_VIEWPORTS)
-- 
GitLab