Oracle GlassFish Server 3.0.1 Scripting Framework Guide

Using the Django Administration Utility

Installing Jython and Django explained Jython on Django installation and configuration for Oracle GlassFish Server. To use the Django administration utility for creating applications based on a database, you need a database and the JDBC drivers for Jython to connect to that database. The following steps briefly describe the tasks involved:

  1. Install a database such as PostgreSQL.

  2. Create a database instance.

  3. Install the django-jython packages for the database connectors, if not already installed.

  4. Edit the settings.py file and configure the database and administration utility.

  5. Add the database drivers to the class path to allow Jython to access the database.

  6. Synchronize the database with the following command:


    jython manage.py syncdb
    
  7. Edit the urls.py file and uncomment the lines pertaining to the administration utility.

  8. Make the stylesheets available to the Jython container:


    asadmin deploy --property jython.mediaRoot=jython-install/Lib/site-packages/django/contrib/admin/
    

You can find more information on how to install and use databases with Django administration in the following tutorial:

http://weblogs.java.net/blog/vivekp/archive/2009/06/run_django_appl_1.html