Changes between Initial Version and Version 1 of OracleSpatialTestSetup


Ignore:
Timestamp:
Oct 16, 2012, 8:45:24 AM (12 years ago)
Author:
Jani Tiainen
Comment:

Initial docs

Legend:

Unmodified
Added
Removed
Modified
  • OracleSpatialTestSetup

    v1 v1  
     1{{{
     2#!text/x-rst
     3========================================
     4Preparing an Oracle GeoDjango test setup
     5========================================
     6
     7Since GeoDjango requires full featured Oracle installation instead of XE this document
     8is meant to ease up installation and testing GeoDjango parts.
     9
     10==============
     11Prerequisities
     12==============
     13
     14Install Oracle client and set it up as documented in https://docs.djangoproject.com/en/1.4/ref/databases/#oracle-notes
     15Install GeoDjango requirements as documented in https://docs.djangoproject.com/en/1.4/ref/contrib/gis/install/
     16
     17======================
     18How to get full Oracle
     19======================
     20
     21Easiest way is to use Oracle VirtualBox with prebuilt Oracle installation VM.
     22
     23#. Download and install **Oracle VirtualBox** from http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html or use package manager from your system.
     24
     25#. Download **Oracle Developer Day** image from http://download.oracle.com/otn/other/virtualbox/dd/Oracle_Developer_Day.ova
     26
     27 **NOTE: You may not use Oracle Developer Day VM for any other purposes than testing**
     28
     29==============
     30Database setup
     31==============
     32
     33#. Create a user and give the needed privileges::
     34
     35    $ sudo su oracle
     36    $ sqlplus / as sysdba
     37    SQL> CREATE USER djangotest IDENTIFIED BY djangotest;
     38    SQL> GRANT DBA TO djangotest;
     39    SQL> quit
     40    $ exit
     41
     42=========
     43Run tests
     44=========
     45
     46#. Create geodjango_oracle.py settings file::
     47   
     48    TEST_RUNNER = 'django.contrib.gis.tests.GeoDjangoTestSuiteRunner'
     49
     50    DATABASES = {
     51        'default' : {
     52                'ENGINE' : 'django.contrib.gis.db.backends.oracle',
     53                'PORT' : '1521',
     54                'HOST' : '192.168.56.101',
     55                'NAME' : 'orcl',
     56                'USER' : 'djangotest',
     57                'PASSWORD' : 'djangotest',
     58        },
     59    }
     60
     61#. Run tests::
     62
     63    django-admin.py test --settings=geodjango_oracle
     64}}}
Back to Top