Refactored the scripting interface greatly.

This commit is contained in:
Armin Ronacher 2014-08-25 16:50:22 +02:00
parent 66ef55ce0a
commit 932f7d7cbb
4 changed files with 65 additions and 36 deletions

View file

@ -24,7 +24,7 @@ from werkzeug.exceptions import HTTPException, InternalServerError, \
from .helpers import _PackageBoundObject, url_for, get_flashed_messages, \
locked_cached_property, _endpoint_from_view_func, find_package
from . import json
from . import json, cli
from .wrappers import Request, Response
from .config import ConfigAttribute, Config
from .ctx import RequestContext, AppContext, _AppCtxGlobals
@ -544,7 +544,7 @@ class Flask(_PackageBoundObject):
#: provided by Flask itself and can be overridden.
#:
#: This is an instance of a :class:`click.Group` object.
self.cli = click.Group(self)
self.cli = cli.AppGroup(self)
def _get_error_handlers(self):
from warnings import warn