Coder Social home page Coder Social logo

django-pyodbc-iseries's Introduction

Getting started with IBM DB Django adapter

IBM iSeries Db2 (pyodbc/iaccess driver) support for the Django application Framework

forked from python-ibmdb-django

Prerequisites for Django for iSeries

  • Python 3.6+
  • Django Framework 2.2.x or above.
  • iAccess Client ODBC Driver

Installation

1. Install Django

Install Django as per instructions from the Django [http://docs.djangoproject.com/en/dev/topics/install/#installing-an-official-release website].

2. Install pyodbc and the DB2 Django adapter (django-pyodbc-iseries)

$ pip install django-pyodbc-iseries  

Tested Operating Systems

  • Ubuntu Linux 18
  • Win64/Win32 bit
  • Mac OS

Supported Databases

  • IBM Db2 for iSeries

Usage

  • Create a new Django project by executing django-admin.py startproject myproj.

  • Navigate to your newly created project directory (myproj, and edit the settings.py file

    DATABASES = {
      'default': {
         'ENGINE'     : 'iseries',
         'NAME'       : 'mydb',
         'USER'       : '<username>',
         'PASSWORD'   : '<pass>',
         'HOST'       : 'host/ipaddress',
      }
    }
    
    USE_TZ = False
  • RUN python manage.py migrate

  • In the tuple INSTALLED_APPS in settings.py add the following lines:

    [ ...,
      'django.contrib.flatpages',
      'django.contrib.redirects',
      'django.contrib.comments',
      'django.contrib.admin',
      ...,
    ]
  • Next step is to run a simple test suite. To do this just execute following command in the project we created earlier:

    $ python manage.py test #for Django-1.5.x or older
    $ Python manage.py test django.contrib.auth #For Django-1.6.x onwards, since test discovery behavior have changed
    

Database Transactions

django-pyodbc-iseries's People

Contributors

hemlatabhatt avatar jospaul1 avatar sabakauser avatar rpriyadh avatar soundstripe avatar vyshakh18 avatar mariobriggs avatar bimalkjha avatar kadler avatar akhilravuri1 avatar mizi avatar prairiesnpr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.