From dc33506bfa6f05d9c0ccd00bd27f66f8b058fee4 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Sun, 5 Jun 2016 21:37:03 -0700 Subject: [PATCH] Removing deprecated refs to flask.ext.* (#566) --- caravel/__init__.py | 10 +++++----- caravel/models.py | 8 ++++---- caravel/views.py | 12 ++++++------ caravel/viz.py | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/caravel/__init__.py b/caravel/__init__.py index 34732c0efbf85..45fa4b71e9c41 100644 --- a/caravel/__init__.py +++ b/caravel/__init__.py @@ -9,10 +9,10 @@ from logging.handlers import TimedRotatingFileHandler from flask import Flask, redirect -from flask.ext.appbuilder import SQLA, AppBuilder, IndexView -from flask.ext.appbuilder.baseviews import expose -from flask.ext.cache import Cache -from flask.ext.migrate import Migrate +from flask_appbuilder import SQLA, AppBuilder, IndexView +from flask_appbuilder.baseviews import expose +from flask_cache import Cache +from flask_migrate import Migrate from caravel import version @@ -47,7 +47,7 @@ logging.getLogger().addHandler(handler) if app.config.get('ENABLE_CORS'): - from flask.ext.cors import CORS + from flask_cors import CORS CORS(app, **app.config.get('CORS_OPTIONS')) diff --git a/caravel/models.py b/caravel/models.py index bdfb0e80bca3d..4c7ee4419b6af 100644 --- a/caravel/models.py +++ b/caravel/models.py @@ -20,10 +20,10 @@ from dateutil.parser import parse from flask import request, g -from flask.ext.appbuilder import Model -from flask.ext.appbuilder.models.mixins import AuditMixin -from flask.ext.appbuilder.models.decorators import renders -from flask.ext.babelpkg import gettext as _ +from flask_appbuilder import Model +from flask_appbuilder.models.mixins import AuditMixin +from flask_appbuilder.models.decorators import renders +from flask_babelpkg import gettext as _ from pydruid.client import PyDruid from pydruid.utils.filters import Dimension, Filter diff --git a/caravel/views.py b/caravel/views.py index 6ab8480605bf7..0d27812a583d0 100644 --- a/caravel/views.py +++ b/caravel/views.py @@ -16,12 +16,12 @@ from flask import ( g, request, redirect, flash, Response, render_template, Markup) -from flask.ext.appbuilder import ModelView, CompactCRUDMixin, BaseView, expose -from flask.ext.appbuilder.actions import action -from flask.ext.appbuilder.models.sqla.interface import SQLAInterface -from flask.ext.appbuilder.security.decorators import has_access -from flask.ext.babelpkg import gettext as __ -from flask.ext.babelpkg import lazy_gettext as _ +from flask_appbuilder import ModelView, CompactCRUDMixin, BaseView, expose +from flask_appbuilder.actions import action +from flask_appbuilder.models.sqla.interface import SQLAInterface +from flask_appbuilder.security.decorators import has_access +from flask_babelpkg import gettext as __ +from flask_babelpkg import lazy_gettext as _ from flask_appbuilder.models.sqla.filters import BaseFilter from sqlalchemy import create_engine, select, text diff --git a/caravel/viz.py b/caravel/viz.py index 4fd12fe736362..ae67f2e0271ad 100644 --- a/caravel/viz.py +++ b/caravel/viz.py @@ -17,8 +17,8 @@ from datetime import datetime, timedelta import pandas as pd import numpy as np -from flask import request, Markup -from flask.ext.babelpkg import lazy_gettext as _ +from flask import request +from flask_babelpkg import lazy_gettext as _ from markdown import markdown from pandas.io.json import dumps from six import string_types