Commit b7509953 authored by Cédric Bonhomme's avatar Cédric Bonhomme

Fixed conflict.

parents b1e9857d b6b3759e
{ {
"directory" : "src/web/static/lib" "directory" : "src/web/static/lib"
} }
...@@ -23,6 +23,7 @@ venv ...@@ -23,6 +23,7 @@ venv
build build
# bower # bower
src/web/static/lib/* src/web/static/lib/*
!src/web/static/lib/leaflet !src/web/static/lib/leaflet
!src/web/static/lib/dc !src/web/static/lib/dc
...@@ -38,3 +39,6 @@ node_modules ...@@ -38,3 +39,6 @@ node_modules
documentation/_build/ documentation/_build/
src/conf/conf.cfg src/conf/conf.cfg
src/web/public/ src/web/public/
# pycharm
.idea/
Cédric Bonhomme <cedric@cedricbonhomme.org>, Luxembourg Institute of Science and Technology Cédric Bonhomme <cedric@cedricbonhomme.org>, Luxembourg Institute of Science and Technology
Damien Nicolas <damien.nicolas@list.lu>, Luxembourg Institute of Science and Technology Damien Nicolas <damien.nicolas@list.lu>, Luxembourg Institute of Science and Technology
<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD
Shelter Database project news Shelter Database project news
0.3 (2016-08-02) 0.3 (2016-08-02)
...@@ -16,3 +17,9 @@ Shelter Database project news ...@@ -16,3 +17,9 @@ Shelter Database project news
0.1 (2015-03-30) 0.1 (2015-03-30)
- initial release. - initial release.
>>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501 >>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501
=======
Shelter Database project news
0.1 (2015-03-30)
- initial release.
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2016 CHARISM Copyright (c) 2016 CHARISM
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software. copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
Shelter Database Shelter Database
================ ================
# Presentation # Presentation
The goal of this application is to list the shelters deployed around the world. The goal of this application is to list the shelters deployed around the world.
The official instance is available [here](https://shelter-database.org). The official instance is available [here](https://shelter-database.org).
Read the [documentation](https://git.list.lu/charism/shelter-database/tree/master/documentation) Read the [documentation](https://git.list.lu/charism/shelter-database/tree/master/documentation)
for information about the deployment of the application. for information about the deployment of the application.
# Documentation # Documentation
To generate the documentation in HTML format: To generate the documentation in HTML format:
./documentation$ sudo pip install sphinx ./documentation$ sudo pip install sphinx
./documentation$ make html ./documentation$ make html
The result will be in the *_build* folder. The result will be in the *_build* folder.
# License # License
This application is under MIT license. This application is under MIT license.
# Contact # Contact
[Luxembourg Institute of Science and Technology](http://www.list.lu) [Luxembourg Institute of Science and Technology](http://www.list.lu)
{ {
"name": "shelter-database", "name": "shelter-database",
"version": "0.0.2", "version": "0.0.2",
"authors": [ "authors": [
"Cédric Bonhomme <cedric.bonhomme@list.lu>", "Cédric Bonhomme <cedric.bonhomme@list.lu>",
"Maarten van der Veen <mvanderveen@redcross.nl>" "Maarten van der Veen <mvanderveen@redcross.nl>"
], ],
"license": "MIT", "license": "MIT",
"ignore": [ "ignore": [
"**/.*" "**/.*"
], ],
"dependencies": { "dependencies": {
"jquery": "~1.11.3", "jquery": "~1.11.3",
"bootstrap-select": "~1.7.5", "bootstrap-select": "~1.7.5",
"bootstrap": "~3.3.6", "bootstrap": "~3.3.6",
"font-awesome": "4.6.3", "font-awesome": "4.6.3",
"datatables.net": "~1.10.10", "datatables.net": "~1.10.10",
"datatables.net-bs": "~1.10.10", "datatables.net-bs": "~1.10.10",
"tinymce": "^4.3.12", "tinymce": "^4.3.12",
"bootstrap-datepicker": "^1.6.1", "bootstrap-datepicker": "^1.6.1",
"lightbox2": "lightbox#^2.8.2" "lightbox2": "lightbox#^2.8.2"
} }
} }
<p><span style="font-size: medium;">Hundreds of thousands of shelters are built throughout the world every year in response to disasters, by a multitude of shelter actors. </span></p> <p><span style="font-size: medium;">Hundreds of thousands of shelters are built throughout the world every year in response to disasters, by a multitude of shelter actors. </span></p>
<p><span style="font-size: medium;">Confronted with the reality of rising numbers of disasters where sheltering presents a key component of the humanitarian assistance the Humanitarian Shelter Sector is challenged to deliver more, efficient and sustainable responses in very different contexts. </span></p> <p><span style="font-size: medium;">Confronted with the reality of rising numbers of disasters where sheltering presents a key component of the humanitarian assistance the Humanitarian Shelter Sector is challenged to deliver more, efficient and sustainable responses in very different contexts. </span></p>
<p><span style="font-size: medium;">Within the Red Cross Movement and other Organisations active in sheltering there exists extensive experience in the implementation of emergency, transitional and permanent shelters.</span></p> <p><span style="font-size: medium;">Within the Red Cross Movement and other Organisations active in sheltering there exists extensive experience in the implementation of emergency, transitional and permanent shelters.</span></p>
<p><span style="font-size: medium;">To consolidate and make available this knowledge the IFRC-SRU is tasked to build up an inventory of shelter solutions documented in a systematic, methodological manner that particularly captures technical details, construction practices, climatic conditions, availability and suitability of materials and techniques and other information for the planning process that helps save time and resources.</span></p> <p><span style="font-size: medium;">To consolidate and make available this knowledge the IFRC-SRU is tasked to build up an inventory of shelter solutions documented in a systematic, methodological manner that particularly captures technical details, construction practices, climatic conditions, availability and suitability of materials and techniques and other information for the planning process that helps save time and resources.</span></p>
<p><span style="font-size: medium;">The Shelter Database is conceived to be a resource for the wider shelter sector, that can help to deliver humanitarian shelter more time- and cost efficient and better adapted to the respective context. The collected data can also serve for technical analysis as well as longer term evaluation of shelter solutions and to identify and share best practices.<br /> The IFRC-SRU has the ambition to systematically map shelter projects in responses where the Shelter Cluster was activated and led by IFRC, however we invite all shelter actors to participate in building up this resource by entering their shelter project using the online format (to enter a shelter, create your profile under &#8220;join&#8221;).</span></p> <p><span style="font-size: medium;">The Shelter Database is conceived to be a resource for the wider shelter sector, that can help to deliver humanitarian shelter more time- and cost efficient and better adapted to the respective context. The collected data can also serve for technical analysis as well as longer term evaluation of shelter solutions and to identify and share best practices.<br /> The IFRC-SRU has the ambition to systematically map shelter projects in responses where the Shelter Cluster was activated and led by IFRC, however we invite all shelter actors to participate in building up this resource by entering their shelter project using the online format (to enter a shelter, create your profile under &#8220;join&#8221;).</span></p>
<p><strong>Please Note: this is work in progress, any comments and corrections are most welcome. Please contact us under <a href="mailto:ifrc-sru@croix-rouge.lu">ifrc-sru@croix-rouge.lu</a></strong></p> <p><strong>Please Note: this is work in progress, any comments and corrections are most welcome. Please contact us under <a href="mailto:ifrc-sru@croix-rouge.lu">ifrc-sru@croix-rouge.lu</a></strong></p>
\ No newline at end of file
<p><span style="font-size: medium;">Des centaines de milliers d'abris sont construits à travers le monde chaque année en réponse aux catastrophes, par une multitude d'acteurs du logement.</span></p> <p><span style="font-size: medium;">Des centaines de milliers d'abris sont construits à travers le monde chaque année en réponse aux catastrophes, par une multitude d'acteurs du logement.</span></p>
<p><span style="font-size: medium;">Face à la réalité du nombre croissant de catastrophes où le recouvrement présente une composante clé de l'aide humanitaire du secteur du logement humanitaire est mis au défi de fournir plus de réponses, efficaces et durables dans des contextes très différents.</span></p> <p><span style="font-size: medium;">Face à la réalité du nombre croissant de catastrophes où le recouvrement présente une composante clé de l'aide humanitaire du secteur du logement humanitaire est mis au défi de fournir plus de réponses, efficaces et durables dans des contextes très différents.</span></p>
<p><span style="font-size: medium;">Dans le Mouvement de la Croix-Rouge et d'autres organisations actives dans l'abri, il existe une vaste expérience dans la mise en œuvre d'urgence, de transition et des abris permanents.</span></p> <p><span style="font-size: medium;">Dans le Mouvement de la Croix-Rouge et d'autres organisations actives dans l'abri, il existe une vaste expérience dans la mise en œuvre d'urgence, de transition et des abris permanents.</span></p>
<p><span style="font-size: medium;">Pour consolider et mettre à la disposition de cette connaissance la FICR-SRU est chargé de mettre en place un inventaire des solutions d'hébergement documentés d'une manière méthodologique systématique qui capte particulièrement les détails techniques, les pratiques de construction, les conditions climatiques, la disponibilité et les qualités des matériaux et des techniques et d'autres informations pour le processus de planification qui permet d'économiser du temps et des ressources.</span></p> <p><span style="font-size: medium;">Pour consolider et mettre à la disposition de cette connaissance la FICR-SRU est chargé de mettre en place un inventaire des solutions d'hébergement documentés d'une manière méthodologique systématique qui capte particulièrement les détails techniques, les pratiques de construction, les conditions climatiques, la disponibilité et les qualités des matériaux et des techniques et d'autres informations pour le processus de planification qui permet d'économiser du temps et des ressources.</span></p>
<p><span style="font-size: medium;">La base de données de Shelter est conçu pour être une ressource pour le secteur du logement plus large, qui peut aider à fournir un abri humanitaire plus de temps et de coûts efficace et mieux adaptée au contexte respectif. Les données recueillies peuvent également servir à l'analyse technique ainsi que évaluation à long terme des solutions d'hébergement et d'identifier et de partager les meilleures pratiques.</span></p> <p><span style="font-size: medium;">La base de données de Shelter est conçu pour être une ressource pour le secteur du logement plus large, qui peut aider à fournir un abri humanitaire plus de temps et de coûts efficace et mieux adaptée au contexte respectif. Les données recueillies peuvent également servir à l'analyse technique ainsi que évaluation à long terme des solutions d'hébergement et d'identifier et de partager les meilleures pratiques.</span></p>
<p><span style="font-size: medium;">La FICR-SRU a l'ambition de cartographier systématiquement les projets de logement dans les réponses où le Shelter Cluster a été activé et dirigé par la FICR, mais nous invitons tous les acteurs du logement pour participer à la construction de cette ressource en entrant leur projet d'abris en utilisant le format en ligne (pour entrer un abri, créez votre profil sous "join").</span></p> <p><span style="font-size: medium;">La FICR-SRU a l'ambition de cartographier systématiquement les projets de logement dans les réponses où le Shelter Cluster a été activé et dirigé par la FICR, mais nous invitons tous les acteurs du logement pour participer à la construction de cette ressource en entrant leur projet d'abris en utilisant le format en ligne (pour entrer un abri, créez votre profil sous "join").</span></p>
<p><span style="font-size: medium;">S'il vous plaît noter: ce travail est en cours, tous les commentaires et corrections sont les bienvenues. S'il vous plaît nous contacter sous <a href="mailto:ifrc-sru@croix-rouge.lu">ifrc-sru@croix-rouge.lu</a></span></p> <p><span style="font-size: medium;">S'il vous plaît noter: ce travail est en cours, tous les commentaires et corrections sont les bienvenues. S'il vous plaît nous contacter sous <a href="mailto:ifrc-sru@croix-rouge.lu">ifrc-sru@croix-rouge.lu</a></span></p>
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD
API API
=== ===
Examples of requests to the Web Service Examples of requests to the Web Service
=======
Web Services
============
Example of requests to the Web Service
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
-------------------------------------- --------------------------------------
.. code-block:: shell .. code-block:: shell
...@@ -20,6 +27,7 @@ Examples of requests to the Web Service ...@@ -20,6 +27,7 @@ Examples of requests to the Web Service
# Get the translations of a string # 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"}]} $ GET http://127.0.0.1:5000/api/translation?q={"filters":[{"name":"original","op":"eq","val":"Name of shelter"}]}
<<<<<<< HEAD
======= =======
Web Services Web Services
============ ============
...@@ -43,3 +51,5 @@ Example of requests to the Web Service ...@@ -43,3 +51,5 @@ Example of requests to the Web Service
# Get the translations of a string # 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"}]} $ GET http://127.0.0.1:5000/api/translation?q={"filters":[{"name":"original","op":"eq","val":"Name of shelter"}]}
>>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501 >>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501
=======
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD
API v0.1 API v0.1
======== ========
...@@ -15,6 +16,25 @@ Request parameters: ...@@ -15,6 +16,25 @@ Request parameters:
Examples Examples
-------- --------
=======
Web Services
============
Usage of the development API v0.1
---------------------------------
request parameters:
**attribute**: pass one or more attribute names, such as `<attribute=Name,Vegetation>`
NOTE: Currently the attribute names may contain capital letters and spaces.
Spaces should be substituted as `<%20>` int the URL, for example
`<Climate%20Zone>`. An alternative "coding-friendly" attribute naming will be implemented shortly,
as unique strings for each attribute whithout spaces and upper case letters.
**format**: use `<format=prettytext>` to get the nicely formatted attribute names in the JSON,
instead of the "coding-friendly" attribute names.
Examples:
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
.. code-block:: shell .. code-block:: shell
...@@ -41,6 +61,7 @@ Examples ...@@ -41,6 +61,7 @@ Examples
http://0.0.0.0:5000/api/v0.1/shelters/Kitchen type/open fire http://0.0.0.0:5000/api/v0.1/shelters/Kitchen type/open fire
#get all shelters which have a specific attribute value #get all shelters which have a specific attribute value
<<<<<<< HEAD
======= =======
Web Services Web Services
============ ============
...@@ -86,3 +107,5 @@ Examples: ...@@ -86,3 +107,5 @@ Examples:
http://0.0.0.0:5000/api/v0.1/shelters/Kitchen type/open fire http://0.0.0.0:5000/api/v0.1/shelters/Kitchen type/open fire
#get all shelters which have a specific attribute value #get all shelters which have a specific attribute value
>>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501 >>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501
=======
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
This diff is collapsed.
Database migrations Database migrations
=================== ===================
Add a new migration script Add a new migration script
-------------------------- --------------------------
.. code-block:: shell .. code-block:: shell
python3.5 src/manager.py db revision -m "comment about the changes" python3.5 src/manager.py db revision -m "comment about the changes"
Then edit appropriately the generated file. Then edit appropriately the generated file.
Update the database to the last version Update the database to the last version
--------------------------------------- ---------------------------------------
.. code-block:: shell .. code-block:: shell
python3.5 src/manager.py db upgrade python3.5 src/manager.py db upgrade
See the history of the migrations on the current database See the history of the migrations on the current database
--------------------------------------------------------- ---------------------------------------------------------
.. code-block:: shell .. code-block:: shell
python3.5 src/manager.py db history python3.5 src/manager.py db history
Database schema Database schema
=============== ===============
.. figure:: _static/uml_graph.png .. figure:: _static/uml_graph.png
:align: center :align: center
Database diagram Database diagram
<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
Deployment Deployment
========== ==========
...@@ -226,6 +229,7 @@ Configuring Tomcat to use the Keystore. pen the Apache Tomcat server configurati ...@@ -226,6 +229,7 @@ Configuring Tomcat to use the Keystore. pen the Apache Tomcat server configurati
nano /etc/tomcat7/server.xml nano /etc/tomcat7/server.xml
<<<<<<< HEAD
Add the following under the existing commented out connector for SSL. Make sure to change the keystorepassword and set the maxThreads to 200 * number of CPU cores Add the following under the existing commented out connector for SSL. Make sure to change the keystorepassword and set the maxThreads to 200 * number of CPU cores
.. code-block:: shell .. code-block:: shell
...@@ -238,11 +242,22 @@ Add the following under the existing commented out connector for SSL. Make sure ...@@ -238,11 +242,22 @@ Add the following under the existing commented out connector for SSL. Make sure
nano /etc/default/tomcat7 nano /etc/default/tomcat7
In JAVA_OPTS you should set a higher value for the maximum heap size (xmx) for example -Xmx1024m (depending on the ressources available and the expected load) instead of the initial 128. Also you should add the initial heap size parameter (xms) and set it's value to the same one as xsx, e.g. -Xms1024m In JAVA_OPTS you should set a higher value for the maximum heap size (xmx) for example -Xmx1024m (depending on the ressources available and the expected load) instead of the initial 128. Also you should add the initial heap size parameter (xms) and set it's value to the same one as xsx, e.g. -Xms1024m
=======
add the following under the existing commented out connector for SSL. Make sure to change the keystorepassword and set the maxThreads to 200 * number of CPU cores
<Connector SSLEnabled="true" acceptCount="100" clientAuth="false" disableUploadTimeout="true" enableLookups="false" maxThreads="25" port="8444" keystoreFile="/etc/tomcat7/.keystore" keystorePass="verysecretpassword" protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https" secure="true" sslProtocol="TLS" />
nano /etc/default/tomcat7
in JAVA_OPTS you should set a higher value for the maximum heap size (xmx) for example -Xmx1024m (depending on the ressources available and the expected load) instead of the initial 128. Also you should add the initial heap size parameter (xms) and set it's value to the same one as xsx, e.g. -Xms1024m
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
Now let's restart tomcat 7 to reload the configuration. Now let's restart tomcat 7 to reload the configuration.
.. code-block:: shell .. code-block:: shell
<<<<<<< HEAD
=======
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
sudo service tomcat7 restart sudo service tomcat7 restart
Download and install Geoserver Download and install Geoserver
...@@ -377,9 +392,14 @@ Enable the site: ...@@ -377,9 +392,14 @@ Enable the site:
The web application is now running with a dedicated user and a thread limit set The web application is now running with a dedicated user and a thread limit set
to 5. to 5.
<<<<<<< HEAD
Update stylesheets Update stylesheets
"""""""""""""""""" """"""""""""""""""
=======
Update stylesheets
"""""""""
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
.. code-block:: shell .. code-block:: shell
...@@ -409,6 +429,7 @@ Two layers are used by the Shelter Database application: ...@@ -409,6 +429,7 @@ Two layers are used by the Shelter Database application:
* `Köppen–Geiger climate classification system <https://shelter-database.org:8443/geoserver/shelters/wms?service=WMS&version=1.1.0&request=GetMap&layers=shelters:koeppen-geiger&styles=&bbox=-180.24500000476837,-90.2449951171875,180.2449951171875,84.22234392166138&width=768&height=371&srs=EPSG:4326&format=application/openlayers>`_; * `Köppen–Geiger climate classification system <https://shelter-database.org:8443/geoserver/shelters/wms?service=WMS&version=1.1.0&request=GetMap&layers=shelters:koeppen-geiger&styles=&bbox=-180.24500000476837,-90.2449951171875,180.2449951171875,84.22234392166138&width=768&height=371&srs=EPSG:4326&format=application/openlayers>`_;
* `Red Cross climate classification system <https://shelter-database.org:8443/geoserver/shelters/wms?service=WMS&version=1.1.0&request=GetMap&layers=shelters:redcross&styles=&bbox=-180.24500000476837,-90.2449951171875,180.2449951171875,84.22234392166138&width=768&height=371&srs=EPSG:4326&format=application/openlayers>`_. * `Red Cross climate classification system <https://shelter-database.org:8443/geoserver/shelters/wms?service=WMS&version=1.1.0&request=GetMap&layers=shelters:redcross&styles=&bbox=-180.24500000476837,-90.2449951171875,180.2449951171875,84.22234392166138&width=768&height=371&srs=EPSG:4326&format=application/openlayers>`_.
<<<<<<< HEAD
======= =======
Deployment Deployment
========== ==========
...@@ -813,3 +834,5 @@ Two layers are used by the Shelter Database application: ...@@ -813,3 +834,5 @@ Two layers are used by the Shelter Database application:
* `Köppen–Geiger climate classification system <https://shelter-database.org:8443/geoserver/shelters/wms?service=WMS&version=1.1.0&request=GetMap&layers=shelters:koeppen-geiger&styles=&bbox=-180.24500000476837,-90.2449951171875,180.2449951171875,84.22234392166138&width=768&height=371&srs=EPSG:4326&format=application/openlayers>`_; * `Köppen–Geiger climate classification system <https://shelter-database.org:8443/geoserver/shelters/wms?service=WMS&version=1.1.0&request=GetMap&layers=shelters:koeppen-geiger&styles=&bbox=-180.24500000476837,-90.2449951171875,180.2449951171875,84.22234392166138&width=768&height=371&srs=EPSG:4326&format=application/openlayers>`_;
* `Red Cross climate classification system <https://shelter-database.org:8443/geoserver/shelters/wms?service=WMS&version=1.1.0&request=GetMap&layers=shelters:redcross&styles=&bbox=-180.24500000476837,-90.2449951171875,180.2449951171875,84.22234392166138&width=768&height=371&srs=EPSG:4326&format=application/openlayers>`_. * `Red Cross climate classification system <https://shelter-database.org:8443/geoserver/shelters/wms?service=WMS&version=1.1.0&request=GetMap&layers=shelters:redcross&styles=&bbox=-180.24500000476837,-90.2449951171875,180.2449951171875,84.22234392166138&width=768&height=371&srs=EPSG:4326&format=application/openlayers>`_.
>>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501 >>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501
=======
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
This diff is collapsed.
<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
.. Shelter Database documentation master file, created by .. Shelter Database documentation master file, created by
sphinx-quickstart on Sun Jun 19 21:53:46 2016. sphinx-quickstart on Sun Jun 19 21:53:46 2016.
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
...@@ -40,6 +43,7 @@ Web Services ...@@ -40,6 +43,7 @@ Web Services
:maxdepth: 2 :maxdepth: 2
api api
<<<<<<< HEAD
api_v0.1 api_v0.1
======= =======
.. Shelter Database documentation master file, created by .. Shelter Database documentation master file, created by
...@@ -84,3 +88,5 @@ Web Services ...@@ -84,3 +88,5 @@ Web Services
api api
>>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501 >>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501
=======
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
This diff is collapsed.
PDF generation PDF generation
============== ==============
If you want to enable the generation of PDF you will need to install the If you want to enable the generation of PDF you will need to install the
following requirements. following requirements.
Requirements Requirements
------------ ------------
.. code-block:: shell .. code-block:: shell
sudo apt-get install libxml2-dev libxslt-dev libcairo-dev libffi-dev libpango1.0-dev sudo apt-get install libxml2-dev libxslt-dev libcairo-dev libffi-dev libpango1.0-dev
# to include JPEG images in PDF files # to include JPEG images in PDF files
sudo apt-get install libgdk-pixbuf2.0-dev sudo apt-get install libgdk-pixbuf2.0-dev
sudo pip3.5 install cairocffi weasyprint sudo pip3.5 install cairocffi weasyprint
This diff is collapsed.
#! /usr/bin/env sh #! /usr/bin/env sh
# drop completely the db (with the sequences) # drop completely the db (with the sequences)
sudo -u postgres dropdb shelter sudo -u postgres dropdb shelter
sudo -u postgres createdb shelter --no-password sudo -u postgres createdb shelter --no-password
echo "ALTER USER pgsqluser WITH ENCRYPTED PASSWORD 'pgsqlpwd';" | sudo -u postgres psql echo "ALTER USER pgsqluser WITH ENCRYPTED PASSWORD 'pgsqlpwd';" | sudo -u postgres psql
echo "GRANT ALL PRIVILEGES ON DATABASE shelter TO pgsqluser;" | sudo -u postgres psql echo "GRANT ALL PRIVILEGES ON DATABASE shelter TO pgsqluser;" | sudo -u postgres psql
This diff is collapsed.
This diff is collapsed.
"""${message} """${message}
Revision ID: ${up_revision} Revision ID: ${up_revision}
Revises: ${down_revision | comma,n} Revises: ${down_revision | comma,n}
Create Date: ${create_date} Create Date: ${create_date}
""" """
# revision identifiers, used by Alembic. # revision identifiers, used by Alembic.
revision = ${repr(up_revision)} revision = ${repr(up_revision)}
down_revision = ${repr(down_revision)} down_revision = ${repr(down_revision)}
branch_labels = ${repr(branch_labels)} branch_labels = ${repr(branch_labels)}
depends_on = ${repr(depends_on)} depends_on = ${repr(depends_on)}
from alembic import op from alembic import op
import sqlalchemy as sa import sqlalchemy as sa
${imports if imports else ""} ${imports if imports else ""}
def upgrade(): def upgrade():
${upgrades if upgrades else "pass"} ${upgrades if upgrades else "pass"}
def downgrade(): def downgrade():
${downgrades if downgrades else "pass"} ${downgrades if downgrades else "pass"}
"""add column updated_at for shelters """add column updated_at for shelters
Revision ID: 9bfedc780ac5 Revision ID: 9bfedc780ac5
Revises: Revises:
Create Date: 2016-06-17 08:48:58.772966 Create Date: 2016-06-17 08:48:58.772966
""" """
# revision identifiers, used by Alembic. # revision identifiers, used by Alembic.
revision = '9bfedc780ac5' revision = '9bfedc780ac5'
down_revision = None down_revision = None
branch_labels = None branch_labels = None
depends_on = None depends_on = None
from alembic import op from alembic import op
import sqlalchemy as sa import sqlalchemy as sa
from datetime import datetime from datetime import datetime