Giter VIP home page Giter VIP logo

faultedearth-django's Introduction

This Django app contains the observation form for the Faulted Earth tool.

To deploy this app you have to integrate it in geonode. Which is composed of:

 * geonode (django framework)
 * geoserver (the "mapserver" which provides all the layers/styling and mapping to db
   tables and much more)
 * a Client javascript app deployed through geoserver as a war


DEPENDENCIES:

    * django south
    * django schemata

        to be placed inside observations git repository and cloned from
        https://github.com/tuttle/django-schemata -- this django "layer" is
        necessary to have postgres' schema support in our django application

        Once this https://code.djangoproject.com/ticket/6148 ticket will be
        complete there will be no more need to use django-schemata, but this
        ticket is a work in progress since a lot of time, so I have chosen the
        django-schemata route.

    * jpype
    * opensha-lite.jar

        to be placed in /usr/share/java

INSTALLATION (rough instructions)

If you are under Ubuntu follow:

http://docs.geonode.org/en/latest/intro/install.html

in /var/lib/geonode/src/GeoNodePy/geonode/ you should link the app, in this
case "observations" in this way:

    ln -s /location/of/observations/git /var/lib/geonode/src/GeoNodePy/geonode/observations

you have to adapt/sync /var/lib/geonode/src/GeoNodePy/geonode/settings.py with
the settings contained in /location/of/observations/git/geonode/settings.py

at geoserver level you have to add a Workspace called geonode and associate a
datastore that matches with the db you have specified in your settings.py or
/etc/geonode/local_settings.py

REBUILDING OF THE DB (quick&dirty script)

create an fe-rebuild.sh script which will contain:

#!/bin/bash
export DB_NAME="geonode_fe_dev"
dropdb $DB_NAME
createdb $DB_NAME
createlang plpgsql $DB_NAME
psql -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql $DB_NAME
psql -f /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql $DB_NAME
# creates the schema[s]
./manage.py manage_schemata
# it's important to sync the database initially just to create the django "boilerplate",
# authorization tables etc with syncdb plus the DJANGO_SCHEMATA_DOMAIN var
export DJANGO_SCHEMATA_DOMAIN="django"
./manage.py syncdb
# this runs the migrations contained in observations/migrate
./manage.py sync_schemata --migrate


if you want to create a migration use south as usual, i.e.

        python ./manage.py schemamigration observations --auto

after changing your model[s]

and then run:

        python ./manage.py migrate_schemata observations

the 'localhost' namespace will be run, and south will migrate the changes.

*NOTE*: this README is a work in progress, so you can miss some bits here and
there -- It will be updated as we streamline the process of deploying
geonode/observations.

faultedearth-django's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

angri

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.