Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 6ee7a6a

Browse files
authored
Merge pull request #168 from arkhamdev/master
replace imports of flask.ext.script with flask_script in docs
2 parents c160818 + 19c26b7 commit 6ee7a6a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/index.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The **Flask-Script** extension provides support for writing external scripts in
99

1010
# manage.py
1111

12-
from flask.ext.script import Manager
12+
from flask_script import Manager
1313

1414
from myapp import app
1515

@@ -57,7 +57,7 @@ with lots of commands you might want to split them into a number of files with r
5757
In your ``manage.py`` file you have to create a ``Manager`` instance. The ``Manager`` class
5858
keeps track of all the commands and handles how they are called from the command line::
5959

60-
from flask.ext.script import Manager
60+
from flask_script import Manager
6161

6262
app = Flask(__name__)
6363
# configure your app
@@ -81,7 +81,7 @@ The next step is to create and add your commands. There are three methods for cr
8181
To take a very simple example, we want to create a ``hello`` command that just prints out "hello world". It
8282
doesn't take any arguments so is very straightforward::
8383

84-
from flask.ext.script import Command
84+
from flask_script import Command
8585

8686
class Hello(Command):
8787
"prints hello world"
@@ -186,7 +186,7 @@ or alternatively::
186186

187187
To facilitate this you use the ``option_list`` attribute of the ``Command`` class::
188188

189-
from flask.ext.script import Command, Manager, Option
189+
from flask_script import Command, Manager, Option
190190

191191
class Hello(Command):
192192

@@ -381,7 +381,7 @@ Getting user input
381381

382382
**Flask-Script** comes with a set of helper functions for grabbing user input from the command line. For example::
383383

384-
from flask.ext.script import Manager, prompt_bool
384+
from flask_script import Manager, prompt_bool
385385

386386
from myapp import app
387387
from myapp.models import db
@@ -411,7 +411,7 @@ runserver
411411

412412
The ``Server`` command runs the **Flask** development server.::
413413

414-
from flask.ext.script import Server, Manager
414+
from flask_script import Server, Manager
415415
from myapp import create_app
416416

417417
manager = Manager(create_app)
@@ -452,7 +452,7 @@ shell
452452

453453
The ``Shell`` command starts a Python shell. You can pass in a ``make_context`` argument, which must be a ``callable`` returning a ``dict``. By default, this is just a dict returning the your Flask application instance::
454454

455-
from flask.ext.script import Shell, Manager
455+
from flask_script import Shell, Manager
456456

457457
from myapp import app
458458
from myapp import models
@@ -597,12 +597,12 @@ Error handling
597597

598598
Users do not like to see stack traces, but developers want them for bug reports.
599599

600-
Therefore, ``flask.ext.script.commands`` provides an `InvalidCommand` error
600+
Therefore, ``flask_script.commands`` provides an `InvalidCommand` error
601601
class which is not supposed to print a stack trace when reported.
602602

603603
In your command handler::
604604

605-
from flask.ext.script.commands import InvalidCommand
605+
from flask_script.commands import InvalidCommand
606606

607607
[… if some command verification fails …]
608608
class MyCommand(Command):

0 commit comments

Comments
 (0)