Documenting the test_modify_context and context_modified_app methods
[mediagoblin.git] / docs / source / pluginwriter / api.rst
CommitLineData
92c597ca
E
1.. MediaGoblin Documentation
2
3 Written in 2013 by MediaGoblin contributors
4
5 To the extent possible under law, the author(s) have dedicated all
6 copyright and related and neighboring rights to this software to
7 the public domain worldwide. This software is distributed without
8 any warranty.
9
10 You should have received a copy of the CC0 Public Domain
11 Dedication along with this software. If not, see
12 <http://creativecommons.org/publicdomain/zero/1.0/>.
13
14
15==========
16Plugin API
17==========
18
4d0191dc
CAW
19This documents the general plugin API.
20
21Please note, at this point OUR PLUGIN HOOKS MAY AND WILL CHANGE.
22Authors are encouraged to develop plugins and work with the
23MediaGoblin community to keep them up to date, but this API will be a
24moving target for a few releases.
25
26Please check the release notes for updates!
27
92c597ca
E
28:mod:`pluginapi` Module
29-----------------------
30
31.. automodule:: mediagoblin.tools.pluginapi
cf41e7d7 32 :members: get_config, register_routes, register_template_path,
36748921 33 register_template_hooks, get_hook_templates,
b835e153 34 hook_handle, hook_runall, hook_transform
f65bf898
CAW
35
36Configuration
37-------------
38
39Your plugin may define its own configuration defaults.
40
41Simply add to the directory of your plugin a config_spec.ini file. An
42example might look like::
43
44 [plugin_spec]
45 some_string = string(default="blork")
46 some_int = integer(default=50)
47
48This means that when people enable your plugin in their config you'll
49be able to provide defaults as well as type validation.
50