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
/etc/geonode/templates.apps/oq-platform2
exposure_export.html is then referenced into the
/var/lib/openquake/oq-ui-api/etc/geonode/templates/oq-platform/includes/menu.html
&
/etc/geonode/templates/oq-platform/includes/menu.html
<li><a href="/oq-platform2/exposure_export.html">Exposure Country Aggregate Data</a></li>
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/
&
/etc/geonode/static/theme
&
/var/lib/openquake/oq-ui-api/etc/geonode/static/theme/
&
/var/www/geonode/static/theme/
add external libs with git submodule
place external libraries (Leaflet, Leaflet.Draw, Wax, L.Wax, Jquery) into: ~/Projects/test/oq-platform/oq-ui-client2/src & /var/www/geonode/static/oq-platform2/src/
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:
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/