Commit c5aeb319 authored by Maarten van der Veen's avatar Maarten van der Veen
Browse files

local changes

parent 7fd040fe
Web Services
============
Example of requests to the Web Service
--------------------------------------
.. code-block:: shell
# Get the list of root categories
$ GET http://127.0.0.1:5000/api/category?q={"filters":[{"name":"parent_id","op":"is_null"}]}
# Get the list of child categories
$ GET http://127.0.0.1:5000/api/category?q={"filters":[{"name":"parent_id","op":"is_not_null"}]}
# Get information about the child category "Walls & Frame"
$ GET http://127.0.0.1:5000/api/category?q={"filters":[{"name":"parent_id","op":"is_not_null"},{"name":"name","op":"eq","val":"Walls %26 frame"}]}
# Get information about an attribute
$ GET http://127.0.0.1:5000/api/attribute?q={"filters":[{"name":"name","op":"eq","val":"Landform"}]}
$ GET http://127.0.0.1:5000/api/attribute?q={"filters":[{"name":"name","op":"eq","val":"Main hazards in country"}]}
# Get the translations of a string
$ GET http://127.0.0.1:5000/api/translation?q={"filters":[{"name":"original","op":"eq","val":"Name of shelter"}]}
Web Services
============
Example of requests to the Web Service
--------------------------------------
.. code-block:: shell
# Get the list of root categories
$ GET http://127.0.0.1:5000/api/category?q={"filters":[{"name":"parent_id","op":"is_null"}]}
# Get the list of child categories
$ GET http://127.0.0.1:5000/api/category?q={"filters":[{"name":"parent_id","op":"is_not_null"}]}
# Get information about the child category "Walls & Frame"
$ GET http://127.0.0.1:5000/api/category?q={"filters":[{"name":"parent_id","op":"is_not_null"},{"name":"name","op":"eq","val":"Walls %26 frame"}]}
# Get information about an attribute
$ GET http://127.0.0.1:5000/api/attribute?q={"filters":[{"name":"name","op":"eq","val":"Landform"}]}
$ GET http://127.0.0.1:5000/api/attribute?q={"filters":[{"name":"name","op":"eq","val":"Main hazards in country"}]}
# Get the translations of a string
$ GET http://127.0.0.1:5000/api/translation?q={"filters":[{"name":"original","op":"eq","val":"Name of shelter"}]}
This diff is collapsed.
This diff is collapsed.
Database migrations
===================
Add a new migration script
--------------------------
.. code-block:: shell
python3.5 src/manager.py db revision -m "comment about the changes"
Then edit appropriately the generated file.
Update the database to the last version
---------------------------------------
.. code-block:: shell
python3.5 src/manager.py db upgrade
See the history of the migrations on the current database
---------------------------------------------------------
.. code-block:: shell
python3.5 src/manager.py db history
Database migrations
===================
Add a new migration script
--------------------------
.. code-block:: shell
python3.5 src/manager.py db revision -m "comment about the changes"
Then edit appropriately the generated file.
Update the database to the last version
---------------------------------------
.. code-block:: shell
python3.5 src/manager.py db upgrade
See the history of the migrations on the current database
---------------------------------------------------------
.. code-block:: shell
python3.5 src/manager.py db history
Database schema
===============
.. figure:: _static/uml_graph.png
:align: center
Database diagram
Database schema
===============
.. figure:: _static/uml_graph.png
:align: center
Database diagram
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
PDF generation
==============
If you want to enable the generation of PDF you will need to install the
following requirements.
Requirements
------------
.. code-block:: shell
sudo apt-get install libxml2-dev libxslt-dev libcairo-dev libffi-dev libpango1.0-dev
# to include JPEG images in PDF files
sudo apt-get install libgdk-pixbuf2.0-dev
sudo pip3.5 install cairocffi weasyprint
PDF generation
==============
If you want to enable the generation of PDF you will need to install the
following requirements.
Requirements
------------
.. code-block:: shell
sudo apt-get install libxml2-dev libxslt-dev libcairo-dev libffi-dev libpango1.0-dev
# to include JPEG images in PDF files
sudo apt-get install libgdk-pixbuf2.0-dev
sudo pip3.5 install cairocffi weasyprint
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment