From 0a7d10f892d5403965acb76f77bf425b6a1c0420 Mon Sep 17 00:00:00 2001 From: Daniel Haaker Date: Fri, 15 Jul 2011 12:01:54 +0200 Subject: [PATCH] Apply flask-07-upgrade --- example/templates/index.html | 2 +- flaskext/debugtoolbar/__init__.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example/templates/index.html b/example/templates/index.html index e091e1a..bb308e5 100644 --- a/example/templates/index.html +++ b/example/templates/index.html @@ -4,6 +4,6 @@

Flask-debug-toolbar

- Redirect example + Redirect example diff --git a/flaskext/debugtoolbar/__init__.py b/flaskext/debugtoolbar/__init__.py index 7e243d0..5433277 100644 --- a/flaskext/debugtoolbar/__init__.py +++ b/flaskext/debugtoolbar/__init__.py @@ -8,10 +8,10 @@ from werkzeug.exceptions import HTTPException from werkzeug.urls import url_quote_plus from flaskext.debugtoolbar.toolbar import DebugToolbar -from flask import Module +from flask import Blueprint -module = Module(__name__) +module = Blueprint('debugtoolbar', __name__) def replace_insensitive(string, target, replacement): """Similar to string.replace() but is case insensitive @@ -73,8 +73,8 @@ class DebugToolbarExtension(object): req = _request_ctx_stack.top.request app = current_app - if 'debugtoolbar' not in app.modules: - app.register_module(module, url_prefix='/_debug_toolbar/views') + if 'debugtoolbar' not in app.blueprints: + app.register_blueprint(module, url_prefix='/_debug_toolbar/views') try: if req.routing_exception is not None: