From 6de9685ab21320a92b3cf108dc042038a2ef8685 Mon Sep 17 00:00:00 2001 From: Gagan Deep Date: Thu, 6 Jun 2024 22:30:23 +0530 Subject: [PATCH] [docs] Improved references --- docs/developer/extending.rst | 20 ++++++++++---------- docs/developer/installation.rst | 2 +- docs/user/intro.rst | 1 + docs/user/rest-api.rst | 14 +++++--------- docs/user/settings.rst | 1 - 5 files changed, 17 insertions(+), 21 deletions(-) delete mode 100644 docs/user/settings.rst diff --git a/docs/developer/extending.rst b/docs/developer/extending.rst index c08d626..d207e7f 100644 --- a/docs/developer/extending.rst +++ b/docs/developer/extending.rst @@ -139,7 +139,7 @@ Add ``openwisp_utils.loaders.DependencyLoader`` to ``TEMPLATES`` in your } ] -6. Inherit the AppConfig class +6. Inherit the AppConfig Class ------------------------------ Please refer to the following files in the sample app of the test project: @@ -155,7 +155,7 @@ For more information regarding the concept of ``AppConfig`` please refer to the `"Applications" section in the django documentation `_. -7. Create your custom models +7. Create your Custom Models ---------------------------- For the purpose of showing an example, we added a simple "details" field @@ -168,7 +168,7 @@ You can add fields in a similar way in your ``models.py`` file. refer to the `"Models" section in the django documentation `_. -8. Add swapper configurations +8. Add Swapper Configurations ----------------------------- Once you have created the models, add the following to your @@ -182,7 +182,7 @@ Once you have created the models, add the following to your Substitute ``myipam`` with the name you chose in step 1. -9. Create database migrations +9. Create Database Migrations ----------------------------- Create and apply database migrations: @@ -196,7 +196,7 @@ For more information, refer to the `"Migrations" section in the django documentation `_. -10. Create the admin +10. Create the Admin -------------------- Refer to the `admin.py file of the sample app @@ -210,7 +210,7 @@ how it can be customized, please refer to `"The django admin site" section in the django documentation `_. -1. Monkey patching +1. Monkey Patching ~~~~~~~~~~~~~~~~~~ If the changes you need to add are relatively small, you can resort to @@ -224,7 +224,7 @@ For example: SubnetAdmin.app_label = "sample_ipam" -2. Inheriting admin classes +2. Inheriting Admin Classes ~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you need to introduce significant changes and/or you don't want to @@ -259,7 +259,7 @@ resort to monkey patching, you can proceed as follows: Substitute ``myipam`` with the name you chose in step 1. -11. Create root URL configuration +11. Create Root URL Configuration --------------------------------- .. code-block:: python @@ -278,7 +278,7 @@ For more information about URL configuration in django, please refer to the `"URL dispatcher" section in the django documentation `_. -12. Import the automated tests +12. Import the Automated Tests ------------------------------ When developing a custom application based on this module, it's a good @@ -306,7 +306,7 @@ For more information about automated tests in django, please refer to `"Testing in Django" `_. -Other base classes that can be inherited and extended +Other Base Classes That Can be Inherited and Extended ----------------------------------------------------- The following steps are not required and are intended for more advanced diff --git a/docs/developer/installation.rst b/docs/developer/installation.rst index 2238915..97952aa 100644 --- a/docs/developer/installation.rst +++ b/docs/developer/installation.rst @@ -74,4 +74,4 @@ Alternatively you can use the git protocol: .. code-block:: shell - pip install -e git+git://github.com/openwisp/openwisp-ipam#egg=openwisp_users + pip install -e git+git://github.com/openwisp/openwisp-ipam#egg=openwisp_ipam diff --git a/docs/user/intro.rst b/docs/user/intro.rst index af2ba09..552a828 100644 --- a/docs/user/intro.rst +++ b/docs/user/intro.rst @@ -12,5 +12,6 @@ OpenWISP IPAM provides the following capabilities: - :doc:`REST API ` for CRUD operations and main features - Possibility to search for an IP or subnet - Visual display for a specific subnet + .. image:: https://raw.githubusercontent.com/openwisp/openwisp-ipam/docs/docs/visual-display.png :target: https://raw.githubusercontent.com/openwisp/openwisp-ipam/docs/docs/visual-display.png diff --git a/docs/user/rest-api.rst b/docs/user/rest-api.rst index 5ae9d91..43eb8a3 100644 --- a/docs/user/rest-api.rst +++ b/docs/user/rest-api.rst @@ -3,7 +3,7 @@ REST API .. _ipam_live_documentation: -Live documentation +Live Documentation ------------------ .. image:: https://raw.githubusercontent.com/openwisp/openwisp-ipam/docs/docs/api-docs.png @@ -14,7 +14,7 @@ available at ``/api/v1/docs/``. .. _ipam_browsable_web_interface: -Browsable web interface +Browsable Web Interface ----------------------- .. image:: https://raw.githubusercontent.com/openwisp/openwisp-ipam/docs/docs/api-ui.png @@ -29,8 +29,7 @@ makes it even easier to find out the details of each endpoint. Authentication -------------- -See openwisp-users: `authenticating with the user token -`_. +See openwisp-users: :ref:`authenticating_rest_api`. When browsing the API via the :ref:`ipam_live_documentation` or the :ref:`ipam_browsable_web_interface`, you can also use the session @@ -49,7 +48,7 @@ paginating the results in conjunction with the ``page`` parameter. .. _ipam_list_endpoints: -List of endpoints +List of Endpoints ----------------- Since the detailed explanation is contained in the @@ -78,10 +77,7 @@ The rate descriptions used in ``DEFAULT_THROTTLE_RATES`` may include Get Next Available IP --------------------- -A model method to fetch the next available IP address under a specific -subnet. This method can also be accessed via a REST API: -`openwisp_ipam/base/models.py -`_ +Fetch the next available IP address under a specific subnet. GET ~~~ diff --git a/docs/user/settings.rst b/docs/user/settings.rst deleted file mode 100644 index 8b13789..0000000 --- a/docs/user/settings.rst +++ /dev/null @@ -1 +0,0 @@ -