diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2014-09-16 14:01:43 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2014-09-16 14:01:43 -0500 |
commit | f6bad0eb26fa7e092570afe1fb7f38b3d1a1941d (patch) | |
tree | 0ca05e7a95cfb30d8b286f3ec72e8c95e212511b /docs/source/pluginwriter/hooks.rst | |
parent | 5b64c92e0816e733c2f88b88ddc0aec070cdc0d3 (diff) | |
parent | 1b4e199668ada5c2ec47df7432ab69e315dc0601 (diff) | |
download | mediagoblin-f6bad0eb26fa7e092570afe1fb7f38b3d1a1941d.tar.lz mediagoblin-f6bad0eb26fa7e092570afe1fb7f38b3d1a1941d.tar.xz mediagoblin-f6bad0eb26fa7e092570afe1fb7f38b3d1a1941d.zip |
Merge branch 'master' into merge-python3-port
Has some issues, will iteratively fix!
Conflicts:
mediagoblin/gmg_commands/__init__.py
mediagoblin/gmg_commands/deletemedia.py
mediagoblin/gmg_commands/users.py
mediagoblin/oauth/views.py
mediagoblin/plugins/api/views.py
mediagoblin/tests/test_api.py
mediagoblin/tests/test_edit.py
mediagoblin/tests/test_oauth1.py
mediagoblin/tests/test_util.py
mediagoblin/tools/mail.py
mediagoblin/webfinger/views.py
setup.py
Diffstat (limited to 'docs/source/pluginwriter/hooks.rst')
-rw-r--r-- | docs/source/pluginwriter/hooks.rst | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/source/pluginwriter/hooks.rst b/docs/source/pluginwriter/hooks.rst new file mode 100644 index 00000000..4aa062e8 --- /dev/null +++ b/docs/source/pluginwriter/hooks.rst @@ -0,0 +1,35 @@ +.. MediaGoblin Documentation + + Written in 2014 by MediaGoblin contributors + + To the extent possible under law, the author(s) have dedicated all + copyright and related and neighboring rights to this software to + the public domain worldwide. This software is distributed without + any warranty. + + You should have received a copy of the CC0 Public Domain + Dedication along with this software. If not, see + <http://creativecommons.org/publicdomain/zero/1.0/>. + + +=============================== +Documentation on Built-in Hooks +=============================== + +This section explains built-in hooks to MediaGoblin. + + +What hooks are available? +========================= + +'collection_add_media' +---------------------- + +This hook is used by ``add_media_to_collection`` +in ``mediagoblin.user_pages.lib``. +It gets a ``CollectionItem`` as its argument. +It's the newly created item just before getting commited. +So the item can be modified by the hook, if needed. +Changing the session regarding this item is currently +undefined behaviour, as the SQL Session might contain other +things. |