mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
doc: Add filename to code snippets in tutorial
[sunil: Add caption for another file too] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
1 parent
ec67b71aa6
commit
213e01abcd
6 files changed
+29
-1
No files matched your search
@@ -52,7 +52,10 @@ Tell FreedomBox that our app exists
|
||||
The first thing to do is tell FreedomBox that our app exists. This is done by
|
||||
writing a small file with the Python import path to our app and placing it in
|
||||
``plinth/modules/transmission/data/etc/plinth/modules-enabled/``. Let us create
|
||||
this file ``transmission``::
|
||||
this file ``transmission``:
|
||||
|
||||
.. code-block:: text
|
||||
:caption: ``plinth/modules/transmission/data/etc/plinth/modules-enabled/transmission``
|
||||
|
||||
plinth.modules.transmission
|
||||
|
||||
@@ -71,6 +74,7 @@ In the FreedomBox framework, each app must be a class derived from the
|
||||
class later.
|
||||
|
||||
.. code-block:: python3
|
||||
:caption: ``__init__.py``
|
||||
|
||||
from plinth import app as app_module
|
||||
|
||||
@@ -89,6 +93,7 @@ itself by calling the ``init()`` method if there is such a method available as
|
||||
``<module>.init()``. The app class must be instantiated here.
|
||||
|
||||
.. code-block:: python3
|
||||
:caption: ``__init__.py``
|
||||
|
||||
app = None
|
||||
|
||||
|
||||
Reference in new issue
Block a user