Commit d7c967cc663bee432f47590dfbc11724d7491277

Authored by Alexandre Barbosa
1 parent 55cd90e7

Update User documentation for plugins

Signed-off-by: Alexandre Barbosa <alexandreab@live.com>
Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Showing 1 changed file with 47 additions and 32 deletions   Show diff stats
docs/source/user.rst
... ... @@ -14,41 +14,33 @@ Install
14 14  
15 15 Plugins
16 16 -------
17   -.. attribute:: COLAB_APPS
  17 +.. attribute:: name
18 18  
19   - :default: None
  19 +Declares the absolute name of the plugin app as a python import path. Example:
  20 +directory.something.someplugin
  21 +
  22 +.. attribute:: verbose_name
20 23  
21   - Describes the activated plugins and its configurations. It's necessary to describe
22   - for each app its name as the variable. The apps described here can be devided into
23   - two categories, that beeing, colab proxy apps and third-party apps.
24   - The upstream variable is only needed to colab proxy apps.
  24 +Delclare the description name of the plugin.
25 25  
26 26 .. attribute:: upstream
27 27  
28   -Declares the upstream server url of the proxy. Only declare if the plugin is a proxy.
  28 +Declares the upstream server url of the proxy. Only declare if the plugin is a
  29 +proxy.
29 30  
30   -dependecies
31   -+++++++++++
  31 +.. attribute:: middlewares
32 32  
33   - A list of the plugin dependecies that will be added to INSTALLED_APPS.
34   - This doesn't automatically install the python dependecies, only add to django apps.
  33 +Declares the middlewares of the plugin in a list format.
35 34  
  35 +.. attribute:: context_processors
36 36  
37   -menu
38   -++++
  37 +Declares the context processors of the plugin in a list format too.
39 38  
40   -.. attribute:: title
  39 +.. attribute:: dependency
41 40  
42   - Declares the menu title.
43   -.. attribute:: links
44   -
45   - Declares the menu items and its links.
46   -.. attribute:: auth_links
47   -
48   - Declares the menu items and its links when the user authenticated.
49   -.. attribute:: dependecies
50   -
51   -Declares a list of the plugin dependecies.
  41 +Declares the additional installed apps that this plugin depends on.
  42 +This doesn't automatically install the python dependecies, only add to django
  43 +apps.
52 44  
53 45 urls
54 46 ++++
... ... @@ -63,15 +55,38 @@ urls
63 55  
64 56 Declares the namespace for the url.
65 57  
66   -context_processors
67   -++++++++++++++++++
  58 +menu
  59 +++++
68 60  
69   - Declares the plugin context processors.
  61 +Declares the menu structure of the app, if it exists. It is a dictionary with
  62 +the folowing keys.
70 63  
71   -middlewares
72   -+++++++++++
  64 +.. attribute:: title
  65 +
  66 + Declares the menu title. It's has a string value.
  67 +.. attribute:: links
  68 +
  69 + Declares the menu items and its links.
  70 +.. attribute:: auth_links
  71 +
  72 + Declares the menu items and its links when the user authenticated.
  73 +.. attribute:: dependecies
73 74  
74   - Declares the plugin middlewares.
  75 +Example:
  76 +
  77 +.. code-block:: python
  78 +
  79 + menu = {
  80 + 'title': _('Code'),
  81 + 'links': (
  82 + (_('Public Projects'), 'public/projects'),
  83 + ),
  84 + 'auth_links': (
  85 + (_('Profile'), 'profile'),
  86 + (_('New Project'), 'projects/new'),
  87 + (_('Projects'), 'dashboard/projects'),
  88 + ),
  89 + }
75 90  
76 91  
77 92 Extra Template Folders
... ... @@ -113,12 +128,12 @@ SVN
113 128 .. TODO
114 129  
115 130 Social Networks
116   -++++
  131 ++++++++++++++++
117 132 .. attribute:: SOCIAL_NETWORK_ENABLED
118 133  
119 134 :default: False
120 135  
121   - When this variable is True, the social networks fields, like Facebook and
  136 + When this variable is True, the social networks fields, like Facebook and
122 137 Twitter, are added in user profile. By default, this fields are disabled.
123 138  
124 139 Auth
... ...