Skip to content

Commit

Permalink
[docs] Fixed errors in README
Browse files Browse the repository at this point in the history
  • Loading branch information
pandafy authored Feb 20, 2024
1 parent 7460f2a commit 66cce46
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Extend admin theme programmatically
``openwisp_utils.admin_theme.theme.register_theme_link``
""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Allows adding items to `OPENWISP_ADMIN_THEME_LINKS <#openwisp_admin_theme_links>`_.
Allows adding items to `OPENWISP_ADMIN_THEME_LINKS <#openwisp_admin_theme_links>`__.

This function is meant to be used by third party apps or OpenWISP modules which
aim to extend the core look and feel of the OpenWISP theme (eg: add new menu icons).
Expand All @@ -229,17 +229,17 @@ aim to extend the core look and feel of the OpenWISP theme (eg: add new menu ico
register_theme_link(links)
+--------------------+-------------------------------------------------------------+
| **Parameter** | **Description** |
+--------------------+-------------------------------------------------------------+
| ``links`` | (``list``) List of *link* items to be added to |
| | `OPENWISP_ADMIN_THEME_LINKS <#openwisp_admin_theme_links>`_ |
+--------------------+-------------------------------------------------------------+
+--------------------+--------------------------------------------------------------+
| **Parameter** | **Description** |
+--------------------+--------------------------------------------------------------+
| ``links`` | (``list``) List of *link* items to be added to |
| | `OPENWISP_ADMIN_THEME_LINKS <#openwisp_admin_theme_links>`__ |
+--------------------+--------------------------------------------------------------+

``openwisp_utils.admin_theme.theme.unregister_theme_link``
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Allows removing items from `OPENWISP_ADMIN_THEME_LINKS <#openwisp_admin_theme_links>`_.
Allows removing items from `OPENWISP_ADMIN_THEME_LINKS <#openwisp_admin_theme_links>`__.

This function is meant to be used by third party apps or OpenWISP modules which
aim additional functionalities to UI of OpenWISP (eg: adding a support chatbot).
Expand All @@ -250,12 +250,12 @@ aim additional functionalities to UI of OpenWISP (eg: adding a support chatbot).
unregister_theme_link(links)
+--------------------+-------------------------------------------------------------+
| **Parameter** | **Description** |
+--------------------+-------------------------------------------------------------+
| ``links`` | (``list``) List of *link* items to be removed from |
| | `OPENWISP_ADMIN_THEME_LINKS <#openwisp_admin_theme_links>`_ |
+--------------------+-------------------------------------------------------------+
+--------------------+--------------------------------------------------------------+
| **Parameter** | **Description** |
+--------------------+--------------------------------------------------------------+
| ``links`` | (``list``) List of *link* items to be removed from |
| | `OPENWISP_ADMIN_THEME_LINKS <#openwisp_admin_theme_links>`__ |
+--------------------+--------------------------------------------------------------+

``openwisp_utils.admin_theme.theme.register_theme_js``
""""""""""""""""""""""""""""""""""""""""""""""""""""""
Expand Down Expand Up @@ -506,7 +506,7 @@ Code example:

.. code-block:: python
from openwisp_utils.admin_theme import register_dashboard_chart
from openwisp_utils.admin_theme import register_dashboard_chart
register_dashboard_chart(
position=1,
Expand Down Expand Up @@ -1143,7 +1143,7 @@ inline object. Following is an example:
# (optional) You can provide a link to documentation for user reference
'documentation_url': (
'https://github.com/openwisp/openwisp-utils'
)
),
# (optional) Icon to be shown along with help text. By default it uses
# "/static/admin/img/icon-alert.svg"
'image_url': '/static/admin/img/icon-alert.svg'
Expand All @@ -1167,8 +1167,8 @@ Code example:
class MyModelAdmin(admin.ModelAdmin):
list_filter = [
('my_field', InputFilter),
'other_field'
...
'other_field',
# ...
]
By default ``InputFilter`` use exact lookup to filter items which matches to the value being
Expand All @@ -1188,8 +1188,8 @@ searched by the user. But this behavior can be changed by modifying ``InputFilte
class MyModelAdmin(admin.ModelAdmin):
list_filter = [
('my_field', MyInputFilter),
'other_field'
...
'other_field',
# ...
]
To know about other lookups that can be used please check
Expand Down Expand Up @@ -1223,8 +1223,8 @@ The derived filter class should define the ``queryset`` method as shown in follo
class MyModelAdmin(admin.ModelAdmin):
list_filter = [
MyInputFilter,
'other_field'
...
'other_field',
# ...
]
``openwisp_utils.admin_theme.filters.AutocompleteFilter``
Expand Down

0 comments on commit 66cce46

Please sign in to comment.