Commit d296493b899dc27a2cf444de63857c051aff93e4
Committed by
Matheus de Sousa Faria
1 parent
3c3e0c07
Exists in
master
and in
4 other branches
Updated plugins docs for namespace change
Signed-off-by: Lucas Moura <lucas.moura128@gmail.com> Signed-off-by: Macartur Sousa <macartur.sc@gmail.com> Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Showing
2 changed files
with
3 additions
and
4 deletions
Show diff stats
docs/source/plugindev.rst
... | ... | @@ -23,6 +23,8 @@ signals structure, some steps are required: |
23 | 23 | contain any special character, such as dot or comma. It is suggested to name |
24 | 24 | the variable "short_name", but that nomenclature is not strictly |
25 | 25 | necessary. |
26 | +* Finally, the variable namespace should also be defined. This variable is the | |
27 | + url namespace for django reverse. | |
26 | 28 | * In order to actually register the signals, it is necessary to implement the |
27 | 29 | method register_signal, which require the name of the plugin that is |
28 | 30 | registering the signals and a list of signals to be registered as parameters. |
... | ... | @@ -57,6 +59,7 @@ signals structure, some steps are required: |
57 | 59 | class PluginApps(ColabPluginAppConfig): |
58 | 60 | short_name = PLUGIN_NAME |
59 | 61 | signals_list = [SIGNAL1, SIGNAL2] |
62 | + namespace = PLUGIN_NAMESPACE | |
60 | 63 | |
61 | 64 | def registered_signal(self): |
62 | 65 | register_signal(self.short_name, self.signals_list) | ... | ... |
docs/source/user.rst
... | ... | @@ -118,7 +118,6 @@ Use this template for the plugin configuration file |
118 | 118 | |
119 | 119 | urls = { |
120 | 120 | 'include': '[plugin_module_path].urls', |
121 | - 'namespace': '[plugin_name]', | |
122 | 121 | 'prefix': '[application_prefix]/', # Exemple: http://site.com/[application_prefix]/ |
123 | 122 | } |
124 | 123 | |
... | ... | @@ -177,9 +176,6 @@ urls |
177 | 176 | Declares the prefix for the url. |
178 | 177 | |
179 | 178 | - Atention: Any URL used in the plugins' settings should not be preceded by "/" |
180 | -.. attribute:: namespace | |
181 | - | |
182 | - Declares the namespace for the url. | |
183 | 179 | |
184 | 180 | menu |
185 | 181 | ++++ | ... | ... |