lino.utils.diag

Some diagnostic utilities.

(This module's source code is available here.)

Functions

layout_fields(ba)

py2rst(self[, doctestfmt])

Render any Python object as reStructuredText.

visible_for(ba)

Shows a list of user profiles for which this action is visible.

Classes

Analyzer()

The class of the lino.utils.diag.analyzer object.

class lino.utils.diag.Analyzer

Bases: object

The class of the lino.utils.diag.analyzer object.

show_window_fields()

List all window actions and the form fields they contain.

show_database_structure()

Show a bullet list of all models and their fields.

show_db_overview()

Return a reStructredText-formatted "database overview" report. Used by test cases in tested documents.

show_foreign_keys()

Return a list that shows how database objects are being referred to by some other database object. This information is important (1) before deleting objects and (2) when merging them.

For every model we see a list of "delete handlers" and a list of fields from other models that point to this model using that delete handler.

Delete handlers are:

  • PROTECT : refuse to delete when other objects refer to this object

  • CASCADE : delete objects refering to this object

  • set_on_delete : make other objects point to something else (or set their pointer to None)

lino.utils.diag.visible_for(ba)

Shows a list of user profiles for which this action is visible.

lino.utils.diag.py2rst(self, doctestfmt=False)

Render any Python object as reStructuredText.

Where "any" currently means a layout or a layout element. lino.core.layouts.BaseLayout lino.modlib.extjs.elems

If the optional argument doctestfmt is specified as True, then output contains less blank lines which might be invalid reStructuredText but is more doctest-friendly.

lino.utils.diag.analyzer = <lino.utils.diag.Analyzer object>

This is a docstring