Commit d296493b899dc27a2cf444de63857c051aff93e4

Authored by Lucas Moura
Committed by Matheus de Sousa Faria
1 parent 3c3e0c07

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>
docs/source/plugindev.rst
@@ -23,6 +23,8 @@ signals structure, some steps are required: @@ -23,6 +23,8 @@ signals structure, some steps are required:
23 contain any special character, such as dot or comma. It is suggested to name 23 contain any special character, such as dot or comma. It is suggested to name
24 the variable "short_name", but that nomenclature is not strictly 24 the variable "short_name", but that nomenclature is not strictly
25 necessary. 25 necessary.
  26 +* Finally, the variable namespace should also be defined. This variable is the
  27 + url namespace for django reverse.
26 * In order to actually register the signals, it is necessary to implement the 28 * In order to actually register the signals, it is necessary to implement the
27 method register_signal, which require the name of the plugin that is 29 method register_signal, which require the name of the plugin that is
28 registering the signals and a list of signals to be registered as parameters. 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,6 +59,7 @@ signals structure, some steps are required:
57 class PluginApps(ColabPluginAppConfig): 59 class PluginApps(ColabPluginAppConfig):
58 short_name = PLUGIN_NAME 60 short_name = PLUGIN_NAME
59 signals_list = [SIGNAL1, SIGNAL2] 61 signals_list = [SIGNAL1, SIGNAL2]
  62 + namespace = PLUGIN_NAMESPACE
60 63
61 def registered_signal(self): 64 def registered_signal(self):
62 register_signal(self.short_name, self.signals_list) 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,7 +118,6 @@ Use this template for the plugin configuration file
118 118
119 urls = { 119 urls = {
120 'include': '[plugin_module_path].urls', 120 'include': '[plugin_module_path].urls',
121 - 'namespace': '[plugin_name]',  
122 'prefix': '[application_prefix]/', # Exemple: http://site.com/[application_prefix]/ 121 'prefix': '[application_prefix]/', # Exemple: http://site.com/[application_prefix]/
123 } 122 }
124 123
@@ -177,9 +176,6 @@ urls @@ -177,9 +176,6 @@ urls
177 Declares the prefix for the url. 176 Declares the prefix for the url.
178 177
179 - Atention: Any URL used in the plugins' settings should not be preceded by "/" 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 menu 180 menu
185 ++++ 181 ++++