Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
w2pext
plugin_dbui
Commits
749b7104
Commit
749b7104
authored
Dec 05, 2019
by
LE GAC Renaud
Browse files
Restore api documentation in PDF.
parent
29e3fca3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
53 deletions
+57
-53
docs/plugin_dbui/api/conf.py
docs/plugin_dbui/api/conf.py
+3
-3
modules/plugin_dbui/dbsvc.py
modules/plugin_dbui/dbsvc.py
+16
-14
modules/plugin_dbui/dbui.py
modules/plugin_dbui/dbui.py
+15
-17
modules/plugin_dbui/gridmodifier.py
modules/plugin_dbui/gridmodifier.py
+23
-19
No files found.
docs/plugin_dbui/api/conf.py
View file @
749b7104
...
...
@@ -218,7 +218,7 @@ latex_elements = {
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents
=
[
(
"index"
,
"plugin_dbui.tex"
,
r
"plugin\_dbui Documentation"
,
(
"index"
,
"plugin_dbui
_api
.tex"
,
r
"plugin\_dbui Documentation"
,
"R. Le Gac"
,
"manual"
),
]
...
...
@@ -248,7 +248,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages
=
[
(
"index"
,
"plugin_dbui"
,
"plugin_dbui Documentation"
,
(
"index"
,
"plugin_dbui
_api
"
,
"plugin_dbui Documentation"
,
[
"R. Le Gac"
],
1
)
]
...
...
@@ -262,7 +262,7 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents
=
[
(
"index"
,
"plugin_dbui"
,
"plugin_dbui Documentation"
,
(
"index"
,
"plugin_dbui
_api
"
,
"plugin_dbui Documentation"
,
"R. Le Gac"
,
"plugin_dbui"
,
"One line description of project."
,
"Miscellaneous"
),
]
...
...
modules/plugin_dbui/dbsvc.py
View file @
749b7104
...
...
@@ -454,12 +454,12 @@ class DbSvc(BaseSvc):
* The full transaction is aborted when:
-
one record does not exist
one record does not exist
.
- t
he delete operation is
rejected by the
callback ``db[tablename]._before_delete``
defined in
the database model. The keyword ``errors``
contains
the error message returns by the callback.
T
he delete operation is
rejected by the
callback ``db[tablename]._before_delete``
defined in
the database model. The keyword ``errors``
contains
the error message returns by the callback.
"""
self
.
dbg
(
"Start DbSvc.destroy"
)
...
...
@@ -641,15 +641,17 @@ class DbSvc(BaseSvc):
in the database.
* The full transaction is aborted when:
- a field value is not validated by the database engine.
The *errors* key contains the dictionary returns by the
validator (the key is the field identifier encoded as
``Table1Field1`` while the value is the error message).
- the transaction is killed by the callback
``db[tablename]._before_update`` defined in the database
model. The *errors* key contains the message (str)
returns by callback
a field value is not validated by the database engine.
The *errors* key contains the dictionary returns by the
validator
(the key is the field identifier encoded as ``Table1Field1``
while the value is the error message).
The transaction is killed by the callback
``db[tablename]._before_update`` defined in the database
model. The *errors* key contains the message (str)
returns by callback.
"""
self
.
dbg
(
"Start DbSvc.update."
)
...
...
modules/plugin_dbui/dbui.py
View file @
749b7104
...
...
@@ -232,23 +232,21 @@ class Dbui(object):
plugins_paths (dict):
contains paths defining javascript libraries for plugins.
The key is the name of the plugin while the value is a
dictionary with 4 keys:
* css (str or list or None):
relative path to CSS files for plugin:
``static/plugin_key/resources/css``
* debug (str or list or None):
relative path to the debug version of the plugin
library: ``static/plugin_key/dbui-debug.js``.
* lg (str or list or None):
relative path to languages files for the plugin
library: ``static/plugin_key/locale/key-lang-fr.js``.
* libmin (str or list or None):
relative path to languages files for the plugin
library: ``static/plugin_key/locale/key-lang-fr.js``.
dictionary with 4 keys (str or list or None):
+--------+---------------------------------------------+
| css | relative path to CSS files: |
| | ``static/plugin_key/resources/css`` |
+--------+---------------------------------------------+
| debug | relative path to the debug version: |
| | ``static/plugin_key/dbui-debug.js`` |
+--------+---------------------------------------------+
| lg | relative path to languages files: |
| | ``static/plugin_key/locale/key-lang-fr.js`` |
+--------+---------------------------------------------+
| libmin | relative path to minified version: |
| | ``static/plugin_key/locale/key-lang-fr.js`` |
+--------+---------------------------------------------+
By default, plugins *ace*, *dbui*, *extjs* and *mathjax* are
configure.
...
...
modules/plugin_dbui/gridmodifier.py
View file @
749b7104
...
...
@@ -219,25 +219,29 @@ class GridModifier(Modifier):
tpl (list):
the template defining how field values are displayed
in the ``TemplateColumn``:
* The syntax of the template is is defined in the
documentation of ``Ext.XTemplate`` constructor.
* There is some limitation when defining the template in
python, namely the use of the template member function.
* Database fields are identified using the ``CapWord``
syntax ``TablenameFieldname``. It works for standard
and reference fields.
* HTML tags are understood.
* Example of a template list:
.. code-block:: python
tpl = [
"<b>{PeopleLast_name}</b><br>",
"{PeopleFirst_name}<br>",
"<tpl if={PeoplePhone_number}>{PeoplePhone_number}</tpl>"
]
in the ``TemplateColumn``.
The syntax of the template is is defined in the
documentation of ``Ext.XTemplate`` constructor.
There is some limitation when defining the template in
python, namely the use of the template member function.
Database fields are identified using the ``CapWord``
syntax ``TablenameFieldname``. It works for standard
and reference fields.
HTML tags are understood.
Example of a template list:
.. code-block:: python
tpl = [
"<b>{PeopleLast_name}</b><br>",
"{PeopleFirst_name}<br>",
"<tpl if={PeoplePhone_number}>{PeoplePhone_number}</tpl>"
]
autohide (bool):
hide the columns associated to the fields
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment