Include the dwelling fractions app into the OQP package
Bug #1097671 reported by
Ben Wyss
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenQuake Platform |
Fix Committed
|
Undecided
|
Ben Wyss |
Bug Description
In the previous spint we investigated the integration of leaflet/mbtiles into the OQP (geonode 1.2) and we were able to integrate the app and it's dependancies.
This bug is to integrate this application into the installation script of the platform and commit to Git.
Changed in openquake: | |
status: | New → Confirmed |
no longer affects: | openquake |
Changed in oq-platform: | |
status: | New → Fix Committed |
assignee: | nobody → Ben Wyss (bmwyss) |
To post a comment you must log in.
In order to add the dwelling fractions & exposure export application to the OQP I applied the following setting by hand to an existing OQP installation:
HTML and JS:
add exposure_ export. html into templates. apps/oq- platform2
/etc/geonode/
exposure_ export. html is then referenced into the openquake/ oq-ui-api/ etc/geonode/ templates/ oq-platform/ includes/ menu.html templates/ oq-platform/ includes/ menu.html oq-platform2/ exposure_ export. html">Exposure Country Aggregate Data</a></li>
/var/lib/
&
/etc/geonode/
<li><a href="/
then add the binding in django to the new exposure_ export. html page in: /var/lib/ geonode/ src/GeoNodePy/ geonode/ urls.py
place the leaflet-legend.css into ~/Projects/ test/oq- platform/ oq-ui-api/ etc/geonode/ static/ theme/ static/ theme openquake/ oq-ui-api/ etc/geonode/ static/ theme/ geonode/ static/ theme/
&
/etc/geonode/
&
/var/lib/
&
/var/www/
add external libs with git submodule test/oq- platform/ oq-ui-client2/ src & /var/www/ geonode/ static/ oq-platform2/ src/
place external libraries (Leaflet, Leaflet.Draw, Wax, L.Wax, Jquery) into: ~/Projects/
Django:
new 'exposure' django project is added into: ~/Projects/ test/oq- platform/ oq-ui-api/ geonode
new project is added into settings.py
an external database connection is made by adding to local_settings.py:
'geddb': {
'ENGINE' : 'django. db.backends. postgresql_ psycopg2' ,
'PASSWORD' : '<passu>',
'OPTIONS' : {
'sslmode' : 'require',
'NAME': 'ged',
'USER': '<name>',
'HOST': '<IP>',
'PORT': <port>,
}
}
and
DATABASE_ROUTERS = ['exposure. router. GedRouter' ]
the new project is referenced into the django root url.py with:
(r'^exposure/', include( 'geonode. exposure. urls')) ,
and
url( r'^oq-platform2 /exposure_ export. html$', 'django. views.generic. simple. direct_ to_template' , exposure_ export. html'}, name='exposure_ country' ),
{'template': 'oq-platform2/