-
django-flat-json-widget - https://github.com/openwisp/django-flat-json-widget
-
django-loci - https://github.com/openwisp/django-loci
-
django-rest-framework-gis - https://github.com/openwisp/django-rest-framework-gis
-
django-swappable-models - https://github.com/openwisp/django-swappable-models
-
django-x509 - https://github.com/openwisp/django-x509
-
netdiff - https://github.com/openwisp/netdiff
-
netengine - https://github.com/openwisp/netengine
-
netjsonconfig - https://github.com/openwisp/netjsonconfig
Note: This document is a personal note where I add the unsaid coding conventions of the OpenWISP community. I usually find these while reviewing PRs of new contributors. Some of these are not hard rules but mere preferences, while some are the best practices adopted by the Python/Django community.
Any setting which is related to an OpenWISP module should not be accessed from the django.conf.settings
object.
Rather, it should be accessed by importing the settings file from the module.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"files": [ | |
{ | |
"path": "/usr/sbin/openwisp-monitoring", | |
"mode": "0744", | |
"contents": "uuid=$(uci get openwisp.http.uuid)\nkey=$(uci get openwisp.http.key)\nbase_url=$(uci get openwisp.http.url)\nverify_ssl=$(uci get openwisp.http.verify_ssl)\nincluded_interfaces=$(uci get openwisp.monitoring.included_interfaces)\nurl=\"$base_url/api/v1/monitoring/device/$uuid/?key=$key\"\ndata=$(/usr/sbin/netjson-monitoring \"$included_interfaces\")\nif [ \"$verify_ssl\" = 0 ]; then\n curl_command='curl -k'\nelse\n curl_command='curl'\nfi\n# send data via POST\n$curl_command -H \"Content-Type: application/json\" \\\n -X POST \\\n -d \"$data\" \\\n -v $url\n" | |
}, | |
{ | |
"path": "/usr/sbin/netjson-monitoring", | |
"mode": "0744", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: openwisp2 | |
become: "{{ become | default('yes') }}" | |
roles: | |
- openwisp.openwisp2-dev # Install the development version of openwisp.openwisp2 from https://github.com/openwisp/ansible-openwisp2/tree/dev#deploying-the-upcoming-release-of-openwisp | |
vars: | |
openwisp2_controller_pip: https://github.com/openwisp/openwisp-controller/tarball/1.0.x | |
openwisp2_netjsonconfig_pip: https://github.com/openwisp/netjsonconfig/tarball/master | |
openwisp2_extra_django_apps: | |
- "openwisp_ipam" | |
- "openwisp_controller.subnet_division" |