/django-ibmi

Django adapter for IBM i

Primary LanguagePythonApache License 2.0Apache-2.0

GitHub Actions status | sdras/awesome-actions

Django Adapter for IBM i

IBM i support for the Django application framework.

django-ibmi enables access to Db2 for IBM i from Django applications.

The adapter has been developed and is supported by IBM.

Please note that this project is still in active development and is not ready for use. 🚨

 * Create a new Django project by executing "django-admin.py startproject myproj".
 * Now go to this newly create directory, and edit settings.py file to
 access Db2 for i.
 * The steps go as follows:
  1. In shell or cmd line run:
        django-admin.py startproject myproj
  2. Edit settings.py file
     * The settings.py will be like (after adding Db2 properties):
       {{{
       DATABASES = {
          'default': {
             'ENGINE'     : 'django-ibmi',
             'NAME'       : 'ibmi-sysname',
             'USER'       : 'uid',
             'PASSWORD'   : 'pwd',
          }
       }
       }}}

Prerequisites for Django on Python

  • Django 2.0 or higher
  • pyodbc 4.0 or higher

Installation

1. Install Django

Follow these instructions to install django.

2. Install IBM i Django adapter (django-ibmi)

TODO

Documentation

TODO

Tested Operating Systems

TODO

Database Transactions

Known Limitations of django-ibmi adapter

  • Non-standard SQL queries are not supported. e.g. "SELECT ? FROM TAB1"
  • For updations involving primary/foreign key references, the entries should be made in correct order. Integrity check is always on and thus the primary keys referenced by the foreign keys in the referencing tables should always exist in the parent table.
  • Db2 Timestamps do not support timezone aware information. Thus a Datetime field including tzinfo(timezone aware info) would fail.

Contributing to the django-ibmi python project

Please read the contribution guidelines

The developer sign-off should include the reference to the DCO in remarks(example below): DCO 1.1 Signed-off-by: Random J Developer random@developer.org