Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

Developed and used over two years by a fast-moving online-news operation, Django was designed to handle two challenges: the intensive deadlines of a newsroom and the stringent requirements of the experienced Web developers who wrote it. It lets you build high-performing, elegant Web applications quickly.

Django focuses on automating as much as possible and adhering to the DRY principle.

Where to download kits

The recommended way to install Django on OpenVMS is to install the Portable Python kit, for more information view Download and installation of Python for OpenVMS

How to install/run Django on OpenVMS

Django for Python is already installed in the Portable Python LD image. The root Django source tree is defined using the logical django_root.

Django for Python includes an Oracle/Rdb backend, so you can develop/deploy using SQLite3 (OpenVMS 8.2 minimum), MySQL, Oracle (need to build a Python module not provided in the Python for OpenVMS distribution), or Rdb.

Setup an application

Django setup

$ @django_root:[vms]setup

Starting a Project

$ python /django_root/django/bin/django-admin.py startproject mysite

 Create the project in a directory which has been created using /version=1.

Test the newly created project

For example, if you want to start a server on port 8000 on IP adress 192.168.0.100:$ set default [.mysite] $ python manage.py runserver –noreload 192.168.0.100:8000 Validating models… 0 errors found Django version 0.97-pre-SVN-unknown, using settings ‘mysite.settings’ Development server is running at http://192.168.0.100:8000/ Quit the server with CONTROL-C.

Note: –noreload is mandatory on OpenVMS

For more information read chapter 2 of the Django book

Django and WASD

A cgiplus example:

$ set default where_is_your_application

$ mcr cgi_exe:pyrte sys$input

import os

import sys

import wasd

# This has to be done here otherwise Django won't be in a directory

# that's in PYTHONPATH.

sys.path.append('/django_root/')

sys.path.append('../')

from django.core.handlers.wsgi import WSGIHandler

if __name__ == '__main__':

os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'

application = WSGIHandler()

while wasd.cgiplus_begin():

wasd.wsgi_run(application)

More information

Django on OpenVMS is similar to Django on any other platform. So Django official Web site and Django book are recommended reading.

Have fun!