Skip to content
Myr

Merge pull request #3248 from Vicolatope/document-blueprint-parameters

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Added :param to the Blueprint concstructor docstring

authored by David Lord · committed by GitHub · parents f7f1d9d, 571b9f5 · Browse files · 1 file+43 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Added: param to the Blueprint concstructor docstring

Diff stats

1 file+43 added−5 removed

  • other:+43 added−5 removed

1 file+43 added−5 removed

modified:flask/blueprints.py+43 added-5 removed
78 unmodified lines
79 view_func, defaults=defaults, **options)808182class 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.8687 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.9192 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.9596 See :ref:`blueprints` for more information.9798 .. versionadded:: 0.799100 :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 """129130 warn_on_modifications = False131 _got_registered_once = False
354 unmodified lines