diff --git a/docs/source/plugindev.rst b/docs/source/plugindev.rst index a3cb3af..3bb34d6 100644 --- a/docs/source/plugindev.rst +++ b/docs/source/plugindev.rst @@ -34,6 +34,7 @@ signals structure, some steps are required: be seen below: .. code-block:: python + from colab.celery import app @app.task(bind=True) @@ -48,6 +49,7 @@ signals structure, some steps are required: .. code-block:: python + from colab.plugins.utils.apps import ColabPluginAppConfig from colab.signals.signals import register_signal, connect_signal from colab.plugins.PLUGIN.tasks import HANDLING_METHOD @@ -71,6 +73,7 @@ signals structure, some steps are required: \*\*kwargs. As you can see below: .. code-block:: python + from colab.signals.signals import send send(signal_name, sender) @@ -78,4 +81,67 @@ signals structure, some steps are required: * If you want to run celery manually to make some tests, you should execute: .. code-block:: shell + colab-admin celeryC worker --loglevel=debug + +Search +---------- + +In order to make some plugin model's searchable, it is necessary to create +some files. First of all, it is necessary to create a directory named "search" +inside the templates directory, that should be found on the plugin root +directory. + +Once the search folder exist, it is necessary to create a html file that will +describe how a model item will be displayed on the colab search page. This file +name must follow the pattern: + +MODELNAME_search_preview.html + +Where the MODELNAME should be the name of the model object that will be +represented on the html file. An example for this file can be seen bellow: + +.. code-block:: guess + + {% load i18n tz highlight gravatar date_format %} + +