42 lines
1.3 KiB
Diff
42 lines
1.3 KiB
Diff
From: anthraxx <levente@leventepolyak.net>
|
|
Date: Wed, 6 Sep 2017 12:03:22 +0200
|
|
Subject: [PATCH] using flask_script everywhere instead of flask.ext.script
|
|
|
|
--- a/docs/index.rst
|
|
+++ b/docs/index.rst
|
|
@@ -577,7 +577,7 @@ Then the user can register the sub-manager to their primary Manager (within mana
|
|
|
|
manager = Manager(app)
|
|
|
|
- from flask.ext.database import manager as database_manager
|
|
+ from flask_database import manager as database_manager
|
|
manager.add_command("database", database_manager)
|
|
|
|
The commands will then be available::
|
|
--- a/tests.py
|
|
+++ b/tests.py
|
|
@@ -5,8 +5,8 @@
|
|
import unittest
|
|
|
|
from flask import Flask
|
|
-from flask.ext.script._compat import StringIO, text_type
|
|
-from flask.ext.script import Command, Manager, Option, prompt, prompt_bool, prompt_choices
|
|
+from flask_script._compat import StringIO, text_type
|
|
+from flask_script import Command, Manager, Option, prompt, prompt_bool, prompt_choices
|
|
|
|
from pytest import raises
|
|
|
|
--- a/flask_script/__init__.py
|
|
+++ b/flask_script/__init__.py
|
|
@@ -12,9 +12,8 @@ from collections import OrderedDict
|
|
import argparse
|
|
|
|
from flask import Flask
|
|
-from flask._compat import text_type
|
|
|
|
-from ._compat import iteritems
|
|
+from ._compat import iteritems, text_type
|
|
from .commands import Group, Option, Command, Server, Shell
|
|
from .cli import prompt, prompt_pass, prompt_bool, prompt_choices
|
|
|