From 49fbe75387f6444fb5786719cb9f5fe237498005 Mon Sep 17 00:00:00 2001 From: Jarek Szczepanski Date: Sun, 1 Mar 2015 21:46:21 +0100 Subject: [PATCH] Fixed docs for BlueprintPlugin --- src/octoprint/plugin/types.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/octoprint/plugin/types.py b/src/octoprint/plugin/types.py index 71c9ed39..a703b4ac 100644 --- a/src/octoprint/plugin/types.py +++ b/src/octoprint/plugin/types.py @@ -600,18 +600,18 @@ class BlueprintPlugin(OctoPrintPlugin): return flask.make_response("Expected a text to echo back.", 400) return flask.request.values["text"] - __plugin_implementations__ = [MyPlugin()] + __plugin_implementations__ = [MyBlueprintPlugin()] Your blueprint will be published by OctoPrint under the base URL ``/plugin//``, so the above example of a plugin with the identifier "myblueprintplugin" would be reachable under ``/plugin/myblueprintplugin/echo``. Just like with regular blueprints you'll be able to create URLs via ``url_for``, just use the prefix - ``plugin.``, e.g.: + ``plugin..``, e.g.: .. code-block:: python - flask.url_for("plugin.myblueprintplugin.echo") # will return "/plugin/myblueprintplugin/echo" + flask.url_for("plugin.myblueprintplugin.myEcho") # will return "/plugin/myblueprintplugin/echo" """