doc/dev: Remove outdated reference to init() at module level

init() at module level no longer exists and has been replaced with module_loader
itself performing equivalent function.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2021-11-18 13:34:02 -08:00 committed by James Valleroy
parent 47cb5e027f
commit 78b08758a3
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -88,20 +88,4 @@ class later.
super().__init__()
As soon as FreedomBox Service (Plinth) starts, it will load all the enabled
modules. After this, it gives a chance to each of the modules to initialize
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
def init():
"""Initialize the Transmission module."""
global app
app = TransmissionApp()
setup_helper = globals()['setup_helper']
if setup_helper.get_state() != 'needs-setup' and app.is_enabled():
app.set_enabled(True)
modules and create app instances for App classes in the module.