Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 109 lines (72 sloc) 4.36 kb
43e12ac @elpaso Plugin upload and validation, done
elpaso authored
1 ========================
2 QGIS Plugins application
3 ========================
4
bb5a5cf @elpaso Docs update
elpaso authored
5 Author: Alessandro Pasotti (www.itopen.it)
6
43e12ac @elpaso Plugin upload and validation, done
elpaso authored
7 The Plugin model
8 ================
9
5cfe975 @elpaso Changes to the model
elpaso authored
10 The plugin model represents a QGIS plugin and holds general informations such as title and description and icon.
43e12ac @elpaso Plugin upload and validation, done
elpaso authored
11
7046c7f @elpaso Improved documentation
elpaso authored
12 The plugin can have zero or more *owners*, *owners* have the same permissions of the original plugin creator.
43e12ac @elpaso Plugin upload and validation, done
elpaso authored
13
14 Permissions
15 -----------
16
17 These rules have been implemented:
18
5cfe975 @elpaso Changes to the model
elpaso authored
19 * every registered user can add a new plugin
20 * *staff* users can approve or disapprove all plugin versions
7046c7f @elpaso Improved documentation
elpaso authored
21 * users which have the special permission `plugins.can_approve` get the versions they upload automatically approved
22 * users which have the special permission `plugins.can_approve` can approve versions uploaded by others as long as they are in the list of the plugin *owners*
23 * a particular plugin can be deleted and edited only by *staff* users and plugin *owners*
24 * if a user without `plugins.can_approve` permission uploads a new version, the plugin version is automatically unapproved.
43e12ac @elpaso Plugin upload and validation, done
elpaso authored
25
010239f @elpaso Added some styles and fixed a few bugs
elpaso authored
26
980cae8 @elpaso Trust management
elpaso authored
27 Trust management
28 ----------------
29
5cfe975 @elpaso Changes to the model
elpaso authored
30 Staff members can grant *trust* to selected plugin creators setting `plugins.can_approve` permission through the front-end application.
980cae8 @elpaso Trust management
elpaso authored
31
7046c7f @elpaso Improved documentation
elpaso authored
32 The plugin details view offers direct links to grant trust to the plugin creator or the plugin *owners*.
43e12ac @elpaso Plugin upload and validation, done
elpaso authored
33
34
35 The PluginVersion model
36 =======================
37
38 Each plugin can have several versions, a version specify the minimum QGIS version needed in order to run that particular plugin version and other informations such as if the version belongs to the "stable" o to the "experimental" branch.
39
40 Validation
41 ----------
42
43 The validation takes place in the PluginVersions forms, at loading time, the compressed file is checked for:
44
bb5a5cf @elpaso Docs update
elpaso authored
45 * file size <= `PLUGIN_MAX_UPLOAD_SIZE`
46 * zip contains `__init__.py` in first level dir
8da8c29 @elpaso Better metadata.txt handling. Experimental flag is now read from meta…
elpaso authored
47 * `__init__.py` must contain valid metadata
bb5a5cf @elpaso Docs update
elpaso authored
48
d792876 @elpaso Fixed validator, added flags boolean conversion. Added more sample te…
elpaso authored
49
5cfe975 @elpaso Changes to the model
elpaso authored
50 * `version` must be unique whithin a plugin
7cdf5b4 @elpaso Fixed small CSS form button bug, fixed typo in plugins/docs, fixed te…
elpaso authored
51 * there must be one and only *last* versions in each plugin's branch
bb5a5cf @elpaso Docs update
elpaso authored
52
7c3a9f9 @elpaso Doc update
elpaso authored
53 At the time of plugin creation, the name of the folder inside the compressed file is stored in the variable `package_name`, this value must be unique and cannot be changed. `package_name` is also used to build SEF URLs, for example the plugin's page for the plugin *Hello World Plugin* with `package_name` *HelloWorld* is `<http://plugins.qgis.org/plugins/HelloWorld/>`_
bc43a39 @elpaso Doc update. Fixed a bug in views.
elpaso authored
54
55 The `package_name` (and hence the first level folder inside the compressed zip file) cannot contain only ASCI letters (A-Z and a-z), digits and the characters underscore (_) and minus (-) and cannot start with a
56 digit.
57
7c3a9f9 @elpaso Doc update
elpaso authored
58 Example from the `HelloWorld` plugin compressed zip file::
59
60 Archive: plugins/tests/HelloWorld/HelloWorld_1.2.zip
3e6ca84 @elpaso Added deprecated red marking, deprecated plugins are still shown in l…
elpaso authored
61 Length Date Time Name
7c3a9f9 @elpaso Doc update
elpaso authored
62 --------- ---------- ----- ----
3e6ca84 @elpaso Added deprecated red marking, deprecated plugins are still shown in l…
elpaso authored
63 0 2011-11-13 15:05 HelloWorld/
64 1304 2011-11-13 12:40 HelloWorld/icon.png
65 374 2011-11-13 15:05 HelloWorld/metadata.txt
66 1094 2011-11-13 12:40 HelloWorld/HelloWorld.py
67 396 2011-11-13 12:40 HelloWorld/__init__.py
7c3a9f9 @elpaso Doc update
elpaso authored
68 --------- -------
3e6ca84 @elpaso Added deprecated red marking, deprecated plugins are still shown in l…
elpaso authored
69 3168 5 files
7c3a9f9 @elpaso Doc update
elpaso authored
70
8da8c29 @elpaso Better metadata.txt handling. Experimental flag is now read from meta…
elpaso authored
71 Metadata
72 ========
7c3a9f9 @elpaso Doc update
elpaso authored
73
4b527cb @elpaso Updated documentation
elpaso authored
74 You can find detailed informations about metadata in the
75 `PyQGIS developer cookbook <https://github.com/qgis/QGIS-Documentation/blob/master/source/docs/pyqgis_developer_cookbook/13_plugins.rst>`_
7c3a9f9 @elpaso Doc update
elpaso authored
76
3e6ca84 @elpaso Added deprecated red marking, deprecated plugins are still shown in l…
elpaso authored
77
43e12ac @elpaso Plugin upload and validation, done
elpaso authored
78 Configuration
79 =============
80
81 All values can be overridden in `settings.py`
82
12ea64d @elpaso Added CSS and XML export. First fully working version.
elpaso authored
83 ========================== ============= =======================
84 Parameter Default Notes
85 ========================== ============= =======================
86 PLUGINS_STORAGE_PATH packages
87 PLUGIN_MAX_UPLOAD_SIZE 1048576 in bytes
88 PLUGINS_FRESH_DAYS 30 days
148f38a @elpaso Added package_name, validtion and logic. Added branch in xls. Added n…
elpaso authored
89 MAIL_FROM_ADDRESS - used in email notifications
bc43a39 @elpaso Doc update. Fixed a bug in views.
elpaso authored
90 PLUGIN_REQUIRED_METADATA [#f1]_ used in validator
91 PLUGIN_OPTIONAL_METADATA [#f2]_ used in validator
12ea64d @elpaso Added CSS and XML export. First fully working version.
elpaso authored
92 ========================== ============= =======================
7cdf5b4 @elpaso Fixed small CSS form button bug, fixed typo in plugins/docs, fixed te…
elpaso authored
93
751bed4 @elpaso Updated docs on plugins
elpaso authored
94
c66e14f @elpaso Added version comparison and qgisMaximumVersion
elpaso authored
95 Plugins XMl
96 ===========
97
98 Plugins XML is available at `http://plugins.qgis.org/plugins/plugins.xml`
99
100 accepted parameters:
101 * qgis: qgis version
102 * stable_only: 0/1, default to 0
103
104
751bed4 @elpaso Updated docs on plugins
elpaso authored
105 .. rubric:: Footnotes
106
107 .. [#f1] 'name', 'description', 'version', 'qgisMinimumVersion'
108 .. [#f2] Supported by metadata.txt only: 'homepage', 'changelog', 'tracker', 'repository', 'tags'
Something went wrong with that request. Please try again.