From 54f3a2ce87b2cf85c6f3b68d12bbae19b75622a3 Mon Sep 17 00:00:00 2001 From: Adam Hopkins Date: Mon, 28 Dec 2020 22:27:48 +0200 Subject: [PATCH] Add force_commit to docs --- docs/sanic/getting_started.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/sanic/getting_started.rst b/docs/sanic/getting_started.rst index 66bacb77c0..a781e43ab7 100644 --- a/docs/sanic/getting_started.rst +++ b/docs/sanic/getting_started.rst @@ -78,3 +78,8 @@ When you instantiate a Sanic instance, that can be retrieved at a later time fro app = Sanic.get_app("my_awesome_server") +If you call ``Sanic.get_app("non-existing")`` on an app that does not exist, it will raise ``SanicException`` by default. You can, instead, force the method to return a new instance of ``Sanic`` with that name: + +.. code-block:: python + + app = Sanic.get_app("my_awesome_server", force_create=True)