Installation

To install the package

pip install django-kaio

Then you’ve to append kaio to INSTALLED_APPS in your settings.

INSTALLED_APPS = (
    ...
    'kaio',
)

Configuration with django-configurations

To use class based settings, we need to configure django-configurations. It’s all explained here.

Modifiying wsgi.py and manage.py

We need to configure two files of our project: manage.py and wsgi.py

  • manage.py
#!/usr/bin/env python

import os
import sys

if __name__ == "__main__":
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'main.settings')
    os.environ.setdefault('DJANGO_CONFIGURATION', 'Base')

    from configurations.management import execute_from_command_line

    execute_from_command_line(sys.argv)
  • wsgi.py
import os

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'main.settings')
os.environ.setdefault('DJANGO_CONFIGURATION', 'Base')

from configurations.wsgi import get_wsgi_application

application = get_wsgi_application()