No Description
Emmanuel Garette d65c2e86ac more test 1 year ago
src more test 1 year ago
tests more test 1 year ago
.eslintrc.js Add ESLint configuration 1 year ago
.gitignore Ignore log files 1 year ago
README add date type with vaadin date picker (3) 2 years ago
TODO added first web test 2 years ago
example.py more test 1 year ago
package.json Update lint command 1 year ago
setup.py update setup.py 2 years ago

README

Tiramisu Web
============

Here is how to use Tiramisu Web in your own project.

1. the Tiramisu library
------------------------

You must have cloned or installed the `Tiramisu <http://tiramisu.labs.libre-entreprise.org/>`_ library.

Tiramisu requires the IPy library, just install or clone it.

If you have cloned IPy, don't forget to add it in your python path::

export PYTHONPATH=$PYTHONPATH:../python-ipy/

If you have cloned Tiramisu, don't forget to add it in your python path::

export PYTHONPATH=$PYTHONPATH:../tiramisu/

2. Install bower components
---------------------------


First, install bower (`npm install -g bower`)

Install bower components::

cd src/
bower install


3. Run the example server
-------------------------

.. note:: The HTML and the bower_components files located in `src/javascript`
should be accessible in your web server

Add the `src/python` and the `tests` folder in your path

export PYTHONPATH=$PYTHONPATH:src/python:tests/python

The `tests` folder is added in order to load a fake tiramisu config object.


Adding your own tiramisu config objects
----------------------------------------

You have to add (see src/python/example.py has an example):

Let's assume that config is your own Tiramisu `Config()` object.

`/variables` with GET method is linked this this code::

tiramisu = Tiramisu(config)
values = tiramisu.get_jsonform()

`/variables/variable/<path>/<value>` with POST method is linked to this code::

tiramisu = Tiramisu(config)
values = tiramisu.set_updates(body, path, value)

`/variables/variable/<path>/<value>` with DELETE method is linked to this code::

tiramisu = Tiramisu(config)
values = tiramisu.del_value(body, path)