Home > Cetacean-Injuries-Database

Cetacean-Injuries-Database

Cetacean-Injuries-Database is a project mainly written in PYTHON and JAVASCRIPT, based on the View license.

A Django project to track data on injured Cetaceans. Moved to https://gitlab.com/morganwahl/Cetacean-Injuries-Database

Credits

Written by Integrated Statistics employee Morgan Wahl. Written under a contract with NOAA (National Oceanic and Atmospheric Administration). Specifically, with the Protected Resources Department of the North-East Regional Office.

Uses the 'silk' iconsets from famfamfam.com (Mark James) (CC3.0-AT license) The OLE icon is derived from one of these.

Uses the sorttable.js script (with some very small modifications) by Stuart Langridge (X11 license).

Dependencies

These are the versions used during development. Earlier (or later) ones may work.

Python 2.5 Django 1.2.5 django-extensions 0.6 django-reversion 1.3.3 django-tinymce 1.5 pytz 2011c lxml-2.2 xhtml2pdf 0.0.3 (xhtml2pdf requires a few other python libraries, however these will be pulled in automatically by it's setup.py)

when deployed via mod_fcgid another python package is required: flup 1.0.2

if using the Oracle backend you need:

cx_Oracle 5.0.4 which requires:

Oracle instantclient-basic 11.2.0.1
Oracle instantclient-sdk 11.2.0.1

I recommend using virtualenv and adding the following to its bin/activate before building and installing cx_Oracle

my additions for cx_Oracle

export ORACLE_HOME=${VIRTUAL_ENV}/lib/instantclient_11_2 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME

unzip the instantclient packages to that lib directory before building cx_Oracle. To use a tnsnames.ora file you can then copy it to

${ORACLE_HOME}/network/admin/tnsnames.ora

This path is case-sensitve! Despite the Oracle docs, it must be lowercase.

IMPORTANT:

Django's Oracle backend contains a bug in

django.db.backends.oracle.base.DatabaseOperations.field_cast_sql

The call in SQL to DBMS_LOB.SUBSTR should be removed or else searching Cases by name causes an error.

This bug was still present at revision 16016 of Django (after version 1.3). see https://code.djangoproject.com/ticket/11580

Installation

Please edit local_settings.py-example and save it as local_settings.py before trying to run anything.

The jQuery library should be present in

/

The jQuery cookie plugin should be in

/

(see https://github.com/carhartl/jquery-cookie )

The a jQuery-ui library with the overcast theme and the tabs component should be present in:

/ /

The MEDIA_ROOT is set in local_settings.py and the jQuery variables are set in settings.py.

Previous:FieldSession