User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

downloadandinstallationdjango [2014/09/16 13:59] (current)
wikiadmin created
Line 1: Line 1:
 +[[http://​​|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  [[http://​​documentation/​faq/#​who-s-behind-this|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  [[http://​​cgi/​wiki?​DontRepeatYourself|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 [[DownloadAndInstallationPython|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/​ startproject mysite
 +:!: Create the project in a directory which has ben created using /version=1.
 +==== Test the newly created project ====
 +For example, if you want to start a server on port 8000 on IP adress​
 +$ set default [.mysite]
 +$ python runserver --noreload​8000
 +Validating models...
 +0 errors found
 +Django version 0.97-pre-SVN-unknown,​ using settings '​mysite.settings'​
 +Development server is running at http://​​8000/​
 +Quit the server with CONTROL-C.
 +Note: --noreload is mandatory on OpenVMS
 +For more information read chapter 2 of the [[http://​​|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.
 +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 [[http://​​|Django official Web site]] and [[http://​​|Django book]] are recommended reading.
 +Have fun!
downloadandinstallationdjango.txt ยท Last modified: 2014/09/16 13:59 by wikiadmin