README.md 3.61 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
# PLUGIN_DBUI

The `plugin_dbui` allows to develop database-driven web-based application
using a rich interface. It relies on the application
framework [web2py](http://www.web2py.com/) and on the javascript library
[Ext JS](https://www.sencha.com/products/extjs/).

The `web2py` framework implements the Model Controller View (MVC) approach.
It is written in [python](https://www.python.org/) and well designs for rapid
development of fast, scalable, secure and portable database-driven web-based
applications.

The `Ext JS` library provides a rich and modern set of widgets.
Written in javascript, the library provides a clean component model and it is
compatible with all major web browsers. Base widgets can be easily extended
using class inheritance or plugins mechanisms.

The plugin `plugin_dbui` acts as a bridge between the `web2py` framework
and the `Ext JS`  library. It connects your model to the `Ext JS` widgets
and to the `web2py` Database Abstraction Layer. It generates automatically
forms and grids for each database table defined in your model resolving foreign
key. It also provides tools to customise forms and grids for complex
applications.

The `plugin_dbui` provides a generic approach to manipulate data in the
database  through a rich interface. For the reporting, it relies on the
controller and the view capabilities of the `web2py` framework, the Ext
JS `grid` widgets and third party library like
[matplotlib](http://pandas.pydata.org/),
[mathjax](https://www.mathjax.org/) and [pandas](http://pandas.pydata.org/).

## Features

* Generate automatically `form` and `grid` for each table of the database.
* Resolve the foreign keys in `form` and `grid` widgets.
* Tools to customise auto-generated `forms` and `grids`.
* The customisation of `form` and `grids` is defined in one place, your model,
  and in one language, python.
* Fields can be organised in many different ways in `forms` using either `Ext JS
  layout` or panel like `tab panel`.
* Context menu to create, destroy, duplicate and update records in grid.
* Paging and filter mechanisms for grid.
* Plugins to export the `Ext JS` grid content as csv, latex or pdf files.
* Plugins to build dedicated wizard.
* Base widgets can be customized using class inheritance or plugins.
* Provide a mechanism to include your own widgets.
* Reporting using `selector` as well as mechanisms provided by the
  `web2py` framework.
* Internationalisation.
* ...

## Installation

The packed version of the `plugin_dbui` and its friends can be obtained using
the versioning tool [git](http://git-scm.com/):

```
LE GAC Renaud's avatar
LE GAC Renaud committed
58
    git clone https://gitlab.in2p3.fr/w2pext/plugins.git
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
```

* Install the `plugin_dbui` in your application using the `web2py`
  administration interface.
* Install the `plugin_extjs` in the same way.
* Install the `plugin_mathjax` if you need to render equation.
* Install the `plugin_ace` if you need the [ace](http://ace.c9.io/) editor.

In order to run `plugin_dbui`, you have to modify the main controller
of your application. It is located in the file
`applications/myapp/controllers/default.py`:

```
    def index():
        return LOAD('plugin_dbui', 'index', vars=request.vars)
```

That's it.

## Documentation

The [documentation](https://marprod.in2p3.fr/plugin_dbui_book) is divided in
three parts: reference manual, API for the python classes and API for the
javascript classes.

## Changelog

Consult the [Changelog](CHANGELOG) page for fixes and enhancements of
each version.

## License
Copyright Renaud Le Gac, 2009-2016.
Distributed under the terms of the
[CECIL](http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.html) license,
`plugin_dbui` is free and open source software.