reword Blueprint class docstring
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by David Lord · parent b89bf9e · Browse files · 1 file·+42 added−22 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+42 added−22 removed
- other:+42 added−22 removed
Provenance
- Commit
571b9f5- Tree
fa7d565- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
b89bf9e
1 file changed+42 added−22 removed
modified:flask/blueprints.py+42 added-22 removed
78 unmodified lines79 view_func, defaults=defaults, **options)80 81 82 class Blueprint(_PackageBoundObject):83- """Represents a blueprint. A blueprint is an object that records84- functions that will be called with the85- :class:`~flask.blueprints.BlueprintSetupState` later to register functions86- or other things on the main application. See :ref:`blueprints` for more87- information.83+ """Represents a blueprint, a collection of routes and other84+ app-related functions that can be registered on a real application85+ later.86 87+ A blueprint is an object that allows defining application functions88+ without requiring an application object ahead of time. It uses the89+ same decorators as :class:`~flask.Flask`, but defers the need for an90+ application by recording them for later registration.91+92+ Decorating a function with a blueprint creates a deferred function93+ that is called with :class:`~flask.blueprints.BlueprintSetupState`94+ when the blueprint is registered on an application.95+96+ See :ref:`blueprints` for more information.97+98 .. versionadded:: 0.799 91- :param name: the name of the Blueprint92- :param import_name: the name of the Blueprint package, __name__ most of the time.93- The module folder will be the blueprint resource folder by default.94- :param static_folder: you can serve your Blueprint static files by setting `static_folder`95- to the folder with static files to serve at `static_url`.96- The path can be absolute or relative to the Blueprint resource folder97- :param static_url: the url to serve static files from. Defaults to ``static_folder``.98- If your app's static_url is the same, your Blueprint's files won't be accessible.99- :param template_folder: your blueprint can expose template from this folder by adding this path100- to the search path of templates. The path can be absolute or relative to101- the Blueprint resource folder.102- :param url_prefix: url to prefix all the Blueprint routes.103- :param subdomain: If set up, Blueprint routes will match on this subdomain.104- :param url_defaults: Blueprint routes will use these default values for105- view arguments.106- :param root_path: you can specify a different root_path than the module folder.107- to become your Blueprint resource folder.100+ :param name: The name of the blueprint. Will be prepended to each101+ endpoint name.102+ :param import_name: The name of the blueprint package, usually103+ ``__name__``. This helps locate the ``root_path`` for the104+ blueprint.105+ :param static_folder: A folder with static files that should be106+ served by the blueprint's static route. The path is relative to107+ the blueprint's root path. Blueprint static files are disabled108+ by default.109+ :param static_url_path: The url to serve static files from.110+ Defaults to ``static_folder``. If the blueprint does not have111+ a ``url_prefix``, the app's static route will take precedence,112+ and the blueprint's static files won't be accessible.113+ :param template_folder: A folder with templates that should be added114+ to the app's template search path. The path is relative to the115+ blueprint's root path. Blueprint templates are disabled by116+ default. Blueprint templates have a lower precedence than those117+ in the app's templates folder.118+ :param url_prefix: A path to prepend to all of the blueprint's URLs,119+ to make them distinct from the rest of the app's routes.120+ :param subdomain: A subdomain that blueprint routes will match on by121+ default.122+ :param url_defaults: A dict of default values that blueprint routes123+ will receive by default.124+ :param root_path: By default, the blueprint will automatically this125+ based on ``import_name``. In certain situations this automatic126+ detection can fail, so the path can be specified manually127+ instead.128 """129 130 warn_on_modifications = False131 _got_registered_once = False354 unmodified lines