mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
doc: dev: Update documentation on calling clients validation
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
6fc9e228a0
commit
838a2ede8c
@ -13,24 +13,20 @@ need to list them and present them. Let's add this information to
|
|||||||
|
|
||||||
.. code-block:: python3
|
.. code-block:: python3
|
||||||
|
|
||||||
from plinth.clients import validate
|
clients = [{
|
||||||
|
|
||||||
clients = validate([{
|
|
||||||
'name': _('Transmission'),
|
'name': _('Transmission'),
|
||||||
'platforms': [{
|
'platforms': [{
|
||||||
'type': 'web',
|
'type': 'web',
|
||||||
'url': '/transmission'
|
'url': '/transmission'
|
||||||
}]
|
}]
|
||||||
}])
|
}]
|
||||||
|
|
||||||
Since our app is a simple web application with no clients needed, we just list
|
Since our app is a simple web application with no clients needed, we just list
|
||||||
that. We need to include this into the main app view. In ``__init__.py``, add:
|
that. We need to include this into the main app view. In ``__init__.py``, add:
|
||||||
|
|
||||||
.. code-block:: python3
|
.. code-block:: python3
|
||||||
|
|
||||||
from .manifest import clients
|
from . import manifest
|
||||||
|
|
||||||
clients = clients
|
|
||||||
|
|
||||||
In ``views.py``, add:
|
In ``views.py``, add:
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user