From 46c0d7bc597c73ed56108ab1e77bf58729360780 Mon Sep 17 00:00:00 2001
From: legac <renaud.legac@free.fr>
Date: Sun, 12 Apr 2015 19:44:54 +0200
Subject: [PATCH] First tentative to create the index using autosummary.

---
 docs/api/conf.py   |  4 ++-
 docs/api/index.rst | 73 ++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 73 insertions(+), 4 deletions(-)

diff --git a/docs/api/conf.py b/docs/api/conf.py
index 58b19521..6b8a2b40 100644
--- a/docs/api/conf.py
+++ b/docs/api/conf.py
@@ -27,7 +27,8 @@ sys.path.insert(0, os.path.abspath('../../../web2py'))
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 
+extensions = ['sphinx.ext.autodoc',
+              'sphinx.ext.autosummary',
               'sphinx.ext.intersphinx', 
               'sphinx.ext.todo', 
               'sphinx.ext.mathjax', 
@@ -250,3 +251,4 @@ texinfo_documents = [
 
 # Example configuration for intersphinx: refer to the Python standard library.
 intersphinx_mapping = {'http://docs.python.org/2.7': None}
+autosummary_generate = True
diff --git a/docs/api/index.rst b/docs/api/index.rst
index 2324a2b0..38f43214 100644
--- a/docs/api/index.rst
+++ b/docs/api/index.rst
@@ -8,10 +8,77 @@ Welcome to plugin_dbui's documentation!
 
 Contents:
 
-.. toctree::
-   :maxdepth: 2
+.. currentmodule:: plugin_dbui
 
-   plugin_dbui
+
+The main class
+==============
+
+Constants
+---------
+
+   =========  ===  =============
+   UNDEF      str  ``undefined``
+   UNDEF_ID   int  ``1``
+   UNKNOWN    str  ``???``
+   =========  ===  =============
+
+Helpers functions
+-----------------
+
+.. currentmodule:: plugin_dbui.helper
+
+.. autosummary::
+   :toctree: generated/
+
+   get_id
+   
+Modifiers
+---------
+
+.. currentmodule:: plugin_dbui.fieldsmodifier
+
+.. autosummary::
+   :toctree: generated/
+
+   FieldsModifier
+
+.. currentmodule:: plugin_dbui.formmodifier
+
+.. autosummary::
+   :toctree: generated/
+
+   FormModifier
+
+.. currentmodule:: plugin_dbui.gridmodifier
+
+.. autosummary::
+   :toctree: generated/
+
+   GridModifier
+
+Validators
+----------
+
+.. currentmodule:: plugin_dbui
+
+Callbacks
+---------
+
+Database service
+----------------
+
+.. autosummary::
+   :toctree: generated/
+   
+   dbsvc.DbSvc
+   directsvc.DirectSvc
+
+Base classes
+------------
+
+Exceptions
+----------
 
 Indices and tables
 ==================
-- 
GitLab