Django application for the Faulted Earth tool
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


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


    * django south
    * django schemata

        to be placed inside observations git repository and cloned from -- this django "layer" is
        necessary to have postgres' schema support in our django application

        Once this 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:

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/ with
the settings contained in /location/of/observations/git/geonode/

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 or

REBUILDING OF THE DB (quick&dirty script)

create an script which will contain:

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_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
./ syncdb
# this runs the migrations contained in observations/migrate
./ sync_schemata --migrate

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

        python ./ schemamigration observations --auto

after changing your model[s]

and then run:

        python ./ 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