@@ -2,33 +2,33 @@ django-owm-legacy
2
2
=================
3
3
4
4
.. image :: https://github.com/openwisp/django-owm-legacy/workflows/Django%20OWM%20Legacy%20CI%20Build/badge.svg?branch=master
5
- :target: https://github.com/openwisp/django-owm-legacy/actions?query=workflow%3A"Django%20OWM%20Legacy%20CI%20Build"
6
- :alt: CI build status
5
+ :target: https://github.com/openwisp/django-owm-legacy/actions?query=workflow%3A"Django%20OWM%20Legacy%20CI%20Build"
6
+ :alt: CI build status
7
7
8
8
.. image :: https://coveralls.io/repos/openwisp/django-owm-legacy/badge.svg
9
- :target: https://coveralls.io/r/openwisp/django-owm-legacy
10
- :alt: Test Coverage
9
+ :target: https://coveralls.io/r/openwisp/django-owm-legacy
10
+ :alt: Test Coverage
11
11
12
12
.. image :: https://img.shields.io/librariesio/release/github/openwisp/django-owm-legacy
13
- :target: https://libraries.io/github/openwisp/django-owm-legacy#repository_dependencies
14
- :alt: Dependency monitoring
13
+ :target: https://libraries.io/github/openwisp/django-owm-legacy#repository_dependencies
14
+ :alt: Dependency monitoring
15
15
16
16
.. image :: https://img.shields.io/gitter/room/nwjs/nw.js.svg
17
- :target: https://gitter.im/openwisp/general
18
- :alt: Chat
17
+ :target: https://gitter.im/openwisp/general
18
+ :alt: Chat
19
19
20
20
.. image :: https://badge.fury.io/py/django-owm-legacy.svg
21
- :target: http://badge.fury.io/py/django-owm-legacy
21
+ :target: http://badge.fury.io/py/django-owm-legacy
22
22
23
23
.. image :: https://pepy.tech/badge/django-owm-legacy
24
- :target: https://pepy.tech/project/django-owm-legacy
25
- :alt: Downloads
24
+ :target: https://pepy.tech/project/django-owm-legacy
25
+ :alt: Downloads
26
26
27
27
.. image :: https://img.shields.io/badge/code%20style-black-000000.svg
28
- :target: https://pypi.org/project/black/
29
- :alt: code style: black
28
+ :target: https://pypi.org/project/black/
29
+ :alt: code style: black
30
30
31
- ------------
31
+ ----
32
32
33
33
Legacy features of OpenWISP Manager reimplemented in django for `OpenWISP2
34
34
<https://github.com/openwisp/ansible-openwisp2> `_.
@@ -68,46 +68,47 @@ If you want to contribute, install your cloned fork:
68
68
Setup (integrate in an existing django project)
69
69
-----------------------------------------------
70
70
71
- Add ``openwisp_controller `` and ``owm_legacy `` to ``INSTALLED_APPS `` as follow:
71
+ Add ``openwisp_controller `` and ``owm_legacy `` to ``INSTALLED_APPS `` as
72
+ follow:
72
73
73
74
.. code-block :: python
74
75
75
76
INSTALLED_APPS = [
76
77
# ...
77
- ' django.contrib.sites' ,
78
+ " django.contrib.sites" ,
78
79
# allauth
79
- ' allauth' ,
80
- ' allauth.account' ,
81
- ' django_extensions' ,
80
+ " allauth" ,
81
+ " allauth.account" ,
82
+ " django_extensions" ,
82
83
# openwisp2 modules
83
- ' openwisp_controller.config' ,
84
- ' openwisp_controller.pki' ,
85
- ' openwisp_controller.geo' ,
86
- ' openwisp_controller.connection' ,
87
- ' openwisp_users' ,
88
- ' openwisp_notifications' ,
89
- ' openwisp_ipam' ,
84
+ " openwisp_controller.config" ,
85
+ " openwisp_controller.pki" ,
86
+ " openwisp_controller.geo" ,
87
+ " openwisp_controller.connection" ,
88
+ " openwisp_users" ,
89
+ " openwisp_notifications" ,
90
+ " openwisp_ipam" ,
90
91
# openwisp2 admin theme
91
92
# (must be loaded here)
92
- ' openwisp_utils.admin_theme' ,
93
- ' django.contrib.admin' ,
94
- ' django.forms' ,
93
+ " openwisp_utils.admin_theme" ,
94
+ " django.contrib.admin" ,
95
+ " django.forms" ,
95
96
# other dependencies
96
- ' sortedm2m' ,
97
- ' reversion' ,
98
- ' leaflet' ,
99
- ' flat_json_widget' ,
100
- ' owm_legacy' ,
97
+ " sortedm2m" ,
98
+ " reversion" ,
99
+ " leaflet" ,
100
+ " flat_json_widget" ,
101
+ " owm_legacy" ,
101
102
# ...
102
103
]
103
104
104
105
Other settings needed in ``settings.py ``:
105
106
106
107
.. code-block :: python
107
108
108
- EXTENDED_APPS = (' django_x509' , ' django_loci' )
109
+ EXTENDED_APPS = (" django_x509" , " django_loci" )
109
110
110
- AUTH_USER_MODEL = ' openwisp_users.User'
111
+ AUTH_USER_MODEL = " openwisp_users.User"
111
112
SITE_ID = 1
112
113
113
114
Your ``urls.py `` should look like the following:
@@ -122,9 +123,9 @@ Your ``urls.py`` should look like the following:
122
123
123
124
124
125
urlpatterns = [
125
- path(' admin/' , include(admin.site.urls)),
126
- path(' ' , include(' openwisp_controller.urls' , namespace = ' controller' )),
127
- path(' ' , include(' owm_legacy.urls' , namespace = ' owm_legacy' )),
126
+ path(" admin/" , include(admin.site.urls)),
127
+ path(" " , include(" openwisp_controller.urls" , namespace = " controller" )),
128
+ path(" " , include(" owm_legacy.urls" , namespace = " owm_legacy" )),
128
129
]
129
130
130
131
urlpatterns += staticfiles_urlpatterns()
@@ -193,31 +194,33 @@ Settings
193
194
``OWM_LEGACY_ALLOWED_SUBNETS ``
194
195
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
195
196
196
- +--------------+------------------------------------------+
197
- | **type **: | ``list `` |
198
- +--------------+------------------------------------------+
199
- | **default **: | ``['10.8.0.0/16', '127.0.0.1/32'] `` |
200
- +--------------+------------------------------------------+
197
+ ============ ===================================
198
+ **type **: ``list ``
199
+ **default **: ``['10.8.0.0/16', '127.0.0.1/32'] ``
200
+ ============ ===================================
201
201
202
- List of strings representing ip networks allowed to retrieve
203
- checksums and download configuration archives.
202
+ List of strings representing ip networks allowed to retrieve checksums and
203
+ download configuration archives.
204
204
205
205
Contributing
206
206
------------
207
207
208
- Please refer to the `OpenWISP contributing guidelines <http://openwisp.io/docs/developer/contributing.html >`_.
208
+ Please refer to the `OpenWISP contributing guidelines
209
+ <http://openwisp.io/docs/developer/contributing.html> `_.
209
210
210
- .. _ PEP8, Style Guide for Python Code : http://www.python.org/dev/peps/pep-0008/
211
+ .. _ pep8, style guide for python code : http://www.python.org/dev/peps/pep-0008/
211
212
212
213
Changelog
213
214
---------
214
215
215
- See `CHANGES <https://github.com/openwisp/django-owm-legacy/blob/master/CHANGES.rst >`_.
216
+ See `CHANGES
217
+ <https://github.com/openwisp/django-owm-legacy/blob/master/CHANGES.rst> `_.
216
218
217
219
License
218
220
-------
219
221
220
- See `LICENSE <https://github.com/openwisp/django-owm-legacy/blob/master/LICENSE >`_.
222
+ See `LICENSE
223
+ <https://github.com/openwisp/django-owm-legacy/blob/master/LICENSE> `_.
221
224
222
225
Support
223
226
-------
0 commit comments