Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

OpenWISP 2 Controller

Project description Requirements Status

OpenWISP 2 controller module (built using Python and the Django web-framework).

Deploy it in production

An automated installer is available at ansible-openwisp2.


  • Python 2.7 or Python >= 3.4
  • OpenSSL

Install stable version from pypi

Install from pypi:

pip install openwisp-controller

Install development version

Install tarball:

pip install

Alternatively you can install via pip using git:

pip install -e git+git://

If you want to contribute, install your cloned fork:

git clone<your_fork>/openwisp-controller.git
cd openwisp_controller
python develop

Setup (integrate in an existing django project)

INSTALLED_APPS and EXTENDED_APPS (an internal openwisp2 setting) in should look like the following (ordering is important):

    # all-auth
    # openwisp2 modules
    # admin
    # other dependencies
    # rest framework
    # channels

EXTENDED_APPS = ('django_netjsonconfig', 'django_x509', 'django_loci',)

Ensure you are using one of the available geodjango backends, eg:

    'default': {
        'ENGINE': 'django.contrib.gis.db.backends.spatialite',
        'NAME': 'openwisp-controller.db',

Add openwisp_utils.staticfiles.DependencyFinder to STATICFILES_FINDERS in your


Add openwisp_utils.loaders.DependencyLoader to TEMPLATES in your

        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'OPTIONS': {
            'loaders': [
            'context_processors': [

Add the following settings to

FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'

    'default': {
        'BACKEND': 'asgiref.inmemory.ChannelLayer',
        'ROUTING': 'openwisp_controller.geo.channels.routing.channel_routing',

LOGIN_REDIRECT_URL = 'admin:index'

from django.conf import settings
from django.conf.urls import include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

from openwisp_utils.admin_theme.admin import admin, openwisp_admin


urlpatterns = [
    url(r'^admin/', include(,
    url(r'', include('openwisp_controller.urls')),

urlpatterns += staticfiles_urlpatterns()

Installing for development

Install sqlite:

sudo apt-get install sqlite3 libsqlite3-dev openssl libssl-dev
sudo apt-get install gdal-bin libproj-dev libgeos-dev libspatialite-dev

Install your forked repo:

git clone git://<your_fork>/openwisp-controller
cd openwisp-controller/
python develop

Install test requirements:

pip install -r requirements-test.txt

Create database:

cd tests/
./ migrate
./ createsuperuser

Launch development server:

./ runserver

You can access the admin interface at

Run tests with:


Install and run on docker

Build from the Dockerfile:

sudo docker build -t openwisp/controller .

Run the docker container:

sudo docker run -it -p 8000:8000 openwisp/controller


  1. Announce your intentions in the OpenWISP Mailing List
  2. Fork this repo and install it
  3. Follow PEP8, Style Guide for Python Code
  4. Write code
  5. Write tests for your code
  6. Ensure all tests pass
  7. Ensure test coverage does not decrease
  8. Document your changes
  9. Send pull request





Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for openwisp-controller, version 0.3.2
Filename, size File type Python version Upload date Hashes
Filename, size openwisp_controller-0.3.2-py2.py3-none-any.whl (58.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size openwisp-controller-0.3.2.tar.gz (45.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page