aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tools/pluginapi.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix some unused imports and local variables.Ben Sturmfels2021-09-231-2/+0
|
* Apply pyupgrade --py36-plus.Ben Sturmfels2021-09-231-1/+1
| | | | This removes some 'u' prefixes and converts simple format() calls to f-strings.
* Apply `pyupgrade --py3-plus` to remove Python 2 compatibility code.Ben Sturmfels2021-03-051-2/+2
|
* Fix plugin documentationSebastian Spaeth2013-09-041-1/+1
| | | | | The docs suggest to use {% template_hook "media_sidebar" %}. This will break Mediagoblin in mysterious ways, and the docs need a fix.
* removing old callable utilities and porting stuff over.Christopher Allan Webber2013-04-191-67/+1
|
* we should be returning the result, not None!Christopher Allan Webber2013-04-191-1/+1
|
* fixing hook_handle for when result is never assigned, avoid reference ↵Christopher Allan Webber2013-04-191-0/+2
| | | | without assignent
* As Elrond points out, we might as well .pop() default_handlerChristopher Allan Webber2013-04-191-1/+1
|
* Hooks: the Next Generation!Christopher Allan Webber2013-04-191-0/+90
| | | | I have not tested any of this but it looks right ;)
* And... pyblosxom code removed again :)Christopher Allan Webber2013-04-191-114/+0
| | | | We agreed on a new direction on IRC last night...
* pyblosxom run_callback hoistedChristopher Allan Webber2013-04-181-0/+114
|
* Remove unhandled_okay from kwargs if it's there before passing to functions.Christopher Allan Webber2013-04-101-1/+3
|
* callable hook convenience functions.. now work, and with tests!Christopher Allan Webber2013-04-101-2/+2
| | | | | | | | - Added three "callables" test plugins. - updated callable_runone to check for unhandled_okay in the kwargs dict. All passing!
* Convenience functions for callable hooksChristopher Allan Webber2013-04-071-0/+65
|
* Improve formatting for hook template docs.Elrond2013-01-311-1/+8
|
* Even better documentation for get_hook_templates!Christopher Allan Webber2013-01-301-1/+9
| | | | Tells how you *can* use it in templates if you really like.
* Improved documentation for get_hook_templates, noting the template tagChristopher Allan Webber2013-01-301-0/+9
|
* Moved the docstring for the plugin template stuff from the class to module ↵Christopher Allan Webber2013-01-301-13/+19
| | | | method
* Geolocation stuff, including including templates seems to be working-ishChristopher Allan Webber2013-01-301-1/+8
| | | | | | | - I'm having trouble seeing if the geolocation stuff actually works, but plugins are included - including a list of template hooks works, however the macro to include them does not, so it's kinda verbose
* Very start of plugin hooks and openstreetmap pluginificationChristopher Allan Webber2013-01-301-0/+27
| | | | | | | | - Added start of template hook code to pluginapi.py - Started to break openstreetmap into plugin; moved templates - Added plugin hooks in media and image media templates ... almost certainly, none of this works yet. :)
* Purge routes package from MG (#507)Sebastian Spaeth2012-11-201-6/+4
| | | | | | | | | We were not actually using the routes package anymore, but it was still mentioned in the documention. Adapt the plugin documentation to actually represent reality, although I don't like the API design. (but this is for another day) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Fixed OAuth access_token duplicate routeJoar Wandborg2012-10-151-0/+1
| | | | Changed route name to "[...]list_connections"
* Switched most stuff over from RoutesJoar Wandborg2012-10-141-1/+1
| | | | | | | | | | Removed the Routes routing functionality and replaced it with werkzeug.routes. Most views are functional. Known issues: - Translation integration with the request object is not yet figured out. This breaks 404 pages.
* Created API plugin, moved api_auth to the API pluginJoar Wandborg2012-09-131-29/+0
|
* Add OAuth models, plugin DB migrations, api_authJoar Wandborg2012-09-131-1/+34
|
* Rework plugin infrastructure to nix side-effectsWill Kahn-Greene2012-07-171-60/+40
| | | | | | | | | | | | | This reworks the plugin infrastructure so as to remove module-loading side-effects which were making things a pain in the ass to test. With the new system, there's no auto-registering meta class. Instead plugins do whatever they want and then specify a hooks dict that maps hook names to callables for the things they're tying into. The most common one (and the only one we've implemented so far) is "setup". This also simplifies the sampleplugin a little by moving the code to __init__.py.
* Finish flatpagesplugin; add plugin docsWill Kahn-Greene2012-07-161-1/+49
|
* Flatpages first passWill Kahn-Greene2012-07-161-1/+33
| | | | | | | | | | This fixes the template loader so that it can load plugin templates. This adds code for registering template paths so that plugins can add their own templates. This adds the base code for the flatpagesfile plugin. It doesn't serve pages, yet, but it's pretty close.
* Update documentation for pluginsWill Kahn-Greene2012-05-161-12/+41
|
* 401. Plugin infrastructureWill Kahn-Greene2012-05-131-0/+118
* implements installing, loading and setup for plugins * codifies configuration * has a sample plugin * docs * tests