Don't set the cli attribute in the sansio scaffold

It is (currently) Flask specific and hence cannot be shared in the
sansio shared code.
This commit is contained in:
pgjones 2023-10-01 16:37:05 +01:00 committed by David Lord
parent adb7dd99c2
commit 5fdce4c331
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
5 changed files with 54 additions and 12 deletions

View file

@ -241,6 +241,16 @@ class Flask(App):
root_path=root_path,
)
#: The Click command group for registering CLI commands for this
#: object. The commands are available from the ``flask`` command
#: once the application has been discovered and blueprints have
#: been registered.
self.cli = cli.AppGroup()
# Set the name of the Click group in case someone wants to add
# the app's commands to another CLI tool.
self.cli.name = self.name
# Add a static route using the provided static_url_path, static_host,
# and static_folder if there is a configured static_folder.
# Note we do this without checking if static_folder exists.