Legacy features of OpenWISP Manager reimplemented in django
Project description
Legacy features of OpenWISP Manager reimplemented in django for OpenWISP2.
Install stable version from pypi
Install from pypi:
pip install django-owm-legacy
Install development version
Install tarball:
pip install https://github.com/openwisp/django-owm-legacy/tarball/master
Alternatively you can install via pip using git:
pip install -e git+git://github.com/openwisp/django-owm-legacy#egg=django-owm-legacy
If you want to contribute, install your cloned fork:
git clone git@github.com:<your_fork>/django-owm-legacy.git
cd django-owm-legacy
python setup.py develop
Setup (integrate in an existing django project)
Add openwisp_controller and owm_legacy to INSTALLED_APPS as follow:
INSTALLED_APPS = [
# ...
'django.contrib.sites',
# allauth
'allauth',
'allauth.account',
'django_extensions',
# openwisp2 modules
'openwisp_controller.config',
'openwisp_controller.pki',
'openwisp_controller.geo',
'openwisp_controller.connection',
'openwisp_users',
'openwisp_notifications',
'openwisp_ipam',
# openwisp2 admin theme
# (must be loaded here)
'openwisp_utils.admin_theme',
'django.contrib.admin',
'django.forms',
# other dependencies
'sortedm2m',
'reversion',
'leaflet',
'flat_json_widget',
'owm_legacy',
# ...
]
Other settings needed in settings.py:
EXTENDED_APPS = ('django_x509', 'django_loci')
AUTH_USER_MODEL = 'openwisp_users.User'
SITE_ID = 1
Your urls.py should look like the following:
from django.urls import include, path
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
admin.autodiscover()
urlpatterns = [
path('admin/', include(admin.site.urls)),
path('', include('openwisp_controller.urls', namespace='controller')),
path('', include('owm_legacy.urls', namespace='owm_legacy')),
]
urlpatterns += staticfiles_urlpatterns()
Installing for development
Install sqlite:
sudo apt install -y sqlite3 libsqlite3-dev openssl libssl-dev
sudo apt install -y gdal-bin libproj-dev libgeos-dev libspatialite-dev libsqlite3-mod-spatialite
Launch Redis:
docker-compose up -d redis
Install your forked repo:
git clone git://github.com/<your_fork>/django-owm-legacy
cd django-owm-legacy/
python setup.py develop
Install test requirements:
pip install -r requirements-test.txt
Create database:
cd tests/
./manage.py migrate
./manage.py createsuperuser
Launch celery worker (for background jobs):
celery -A openwisp2 worker -l info
Launch development server:
./manage.py runserver
You can access the admin interface at http://127.0.0.1:8000/admin/.
Run tests with:
./runtests.py
Settings
OWM_LEGACY_ALLOWED_SUBNETS
type: |
list |
default: |
['10.8.0.0/16', '127.0.0.1/32'] |
List of strings representing ip networks allowed to retrieve checksums and download configuration archives.
Contributing
Please refer to the OpenWISP contributing guidelines.
Changelog
See CHANGES.
License
See LICENSE.
Support
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-owm-legacy-1.0.tar.gz
.
File metadata
- Download URL: django-owm-legacy-1.0.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.27.1 setuptools/59.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c01630dee94664297146a043d620ea0c0787cdf6e4e1195cbb6f313cde2ba65d |
|
MD5 | 8b40d1c97329a5d7eb3c27a04be5b23f |
|
BLAKE2b-256 | ab979cf345b0e7ebdf62267e905d18b889cd4436ceb2edbcbe07582fc34b740b |
File details
Details for the file django_owm_legacy-1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: django_owm_legacy-1.0-py2.py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.27.1 setuptools/59.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f0cce10748df98b1e4e79589cad8b5e62441427c2435e8bbad981c76b2a2e8f |
|
MD5 | 0ff745d672c46b6ee4bef199405a3ddb |
|
BLAKE2b-256 | 5df3a1ee21d3bbdfa35760c6bad3c0f6d10f813e204d4f09604c425aa968d016 |