|
|
@ -15,9 +15,9 @@ |
|
|
|
:copyright: (c) 2015 by Armin Ronacher. |
|
|
|
:copyright: (c) 2015 by Armin Ronacher. |
|
|
|
:license: BSD, see LICENSE for more details. |
|
|
|
:license: BSD, see LICENSE for more details. |
|
|
|
""" |
|
|
|
""" |
|
|
|
|
|
|
|
import types |
|
|
|
import sys |
|
|
|
import sys |
|
|
|
import os |
|
|
|
import os |
|
|
|
import imp |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ExtensionImporter(object): |
|
|
|
class ExtensionImporter(object): |
|
|
@ -118,7 +118,7 @@ class ExtensionImporter(object): |
|
|
|
|
|
|
|
|
|
|
|
def activate(): |
|
|
|
def activate(): |
|
|
|
import flask |
|
|
|
import flask |
|
|
|
ext_module = imp.new_module('flask.ext') |
|
|
|
ext_module = types.ModuleType('flask.ext') |
|
|
|
ext_module.__path__ = [] |
|
|
|
ext_module.__path__ = [] |
|
|
|
flask.ext = sys.modules['flask.ext'] = ext_module |
|
|
|
flask.ext = sys.modules['flask.ext'] = ext_module |
|
|
|
importer = ExtensionImporter(['flask_%s', 'flaskext.%s'], 'flask.ext') |
|
|
|
importer = ExtensionImporter(['flask_%s', 'flaskext.%s'], 'flask.ext') |
|
|
|