Skip to content

Commit e919a9e

Browse files
committed
fixing example code inexact matches and adding new signals got request exception for flask
1 parent bac6706 commit e919a9e

22 files changed

+1742
-3370
lines changed

content/pages/examples/flask/flask-blueprints-blueprint.markdown

Lines changed: 40 additions & 271 deletions
Large diffs are not rendered by default.

content/pages/examples/flask/flask-cli-flaskgroup.markdown

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ FlaskBB is provided as open source
2424

2525
```python
2626
# main.py
27-
flaskbb.cli.commands
28-
--------------------
29-
30-
This module contains the main commands.
31-
32-
:copyright: (c) 2016 by the FlaskBB Team.
33-
:license: BSD, see LICENSE for more details.
34-
"""
3527
import binascii
3628
import logging
3729
import os
@@ -96,6 +88,5 @@ click_log.basic_config(logger)
9688

9789
## ... source file continues with no further FlaskGroup examples...
9890

99-
10091
```
10192

content/pages/examples/flask/flask-cli-scriptinfo.markdown

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ FlaskBB is provided as open source
2424

2525
```python
2626
# main.py
27-
flaskbb.cli.commands
28-
--------------------
29-
30-
This module contains the main commands.
31-
32-
:copyright: (c) 2016 by the FlaskBB Team.
33-
:license: BSD, see LICENSE for more details.
34-
"""
3527
import binascii
3628
import logging
3729
import os
@@ -106,14 +98,11 @@ def make_app(script_info):
10698

10799

108100
def set_config(ctx, param, value):
109-
"""This will pass the config file to the create_app function."""
110101
~~ ctx.ensure_object(ScriptInfo).config_file = value
111102

112103

113104
def set_instance(ctx, param, value):
114-
"""This will pass the instance path on the script info which can then
115-
be used in 'make_app'."""
116-
ctx.ensure_object(ScriptInfo).instance_path = value
105+
~~ ctx.ensure_object(ScriptInfo).instance_path = value
117106

118107

119108
@click.group(cls=FlaskBBGroup, create_app=make_app, add_version_option=False,
@@ -132,10 +121,15 @@ def set_instance(ctx, param, value):
132121
is_flag=True, is_eager=True, help="Show the FlaskBB version.")
133122
@click.pass_context
134123
@click_log.simple_verbosity_option(logger)
124+
def flaskbb(ctx):
125+
if ctx.invoked_subcommand is None:
126+
click.echo(ctx.get_help())
135127

136128

137-
## ... source file continues with no further ScriptInfo examples...
129+
flaskbb.add_command(alembic_click, "db")
138130

139131

132+
## ... source file continues with no further ScriptInfo examples...
133+
140134
```
141135

0 commit comments

Comments
 (0)