Skip to content

Commit

Permalink
Merge pull request apache#1084 from jeffwidman/fix-flask-ext
Browse files Browse the repository at this point in the history
Replace deprecated flask.ext.* with flask_*
  • Loading branch information
mistercrunch committed Feb 26, 2016
2 parents 6b8a476 + a810d3e commit f1a9a0e
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion airflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from airflow import configuration as conf

from airflow.models import DAG
from flask.ext.admin import BaseView
from flask_admin import BaseView
from importlib import import_module
from airflow.utils import AirflowException

Expand Down
2 changes: 1 addition & 1 deletion airflow/contrib/auth/backends/password_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from wtforms.validators import InputRequired

from flask import url_for, redirect
from flask.ext.bcrypt import generate_password_hash, check_password_hash
from flask_bcrypt import generate_password_hash, check_password_hash

from sqlalchemy import (
Column, String, DateTime)
Expand Down
2 changes: 1 addition & 1 deletion airflow/contrib/plugins/metastore_browser/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import json

from flask import Blueprint, request
from flask.ext.admin import BaseView, expose
from flask_admin import BaseView, expose
import pandas as pd

from airflow.hooks import HiveMetastoreHook, MySqlHook, PrestoHook, HiveCliHook
Expand Down
4 changes: 2 additions & 2 deletions airflow/www/app.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import socket

from flask import Flask
from flask.ext.admin import Admin, base
from flask.ext.cache import Cache
from flask_admin import Admin, base
from flask_cache import Cache
from flask_wtf.csrf import CsrfProtect

import airflow
Expand Down
2 changes: 1 addition & 1 deletion airflow/www/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from __future__ import unicode_literals

from datetime import datetime
from flask.ext.admin.form import DateTimePickerWidget
from flask_admin.form import DateTimePickerWidget
from wtforms import DateTimeField, SelectField
from flask_wtf import Form

Expand Down
2 changes: 1 addition & 1 deletion airflow/www/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import json
import os
from flask import after_this_request, request, Response
from flask.ext.login import current_user
from flask_login import current_user
from jinja2 import Template
import wtforms
from wtforms.compat import text_type
Expand Down
8 changes: 4 additions & 4 deletions airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@


from flask import redirect, url_for, request, Markup, Response, current_app, render_template
from flask.ext.admin import BaseView, expose, AdminIndexView
from flask.ext.admin.contrib.sqla import ModelView
from flask.ext.admin.actions import action
from flask.ext.login import flash
from flask_admin import BaseView, expose, AdminIndexView
from flask_admin.contrib.sqla import ModelView
from flask_admin.actions import action
from flask_login import flash
from flask._compat import PY2

import jinja2
Expand Down
6 changes: 3 additions & 3 deletions docs/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ looks like:
admin_views = []
# A list of Blueprint object created from flask.Blueprint
flask_blueprints = []
# A list of menu links (flask.ext.admin.base.MenuLink)
# A list of menu links (flask_admin.base.MenuLink)
menu_links = []
Expand All @@ -88,8 +88,8 @@ definitions in Airflow.
from airflow.plugins_manager import AirflowPlugin
from flask import Blueprint
from flask.ext.admin import BaseView, expose
from flask.ext.admin.base import MenuLink
from flask_admin import BaseView, expose
from flask_admin.base import MenuLink
# Importing base classes that we need to derive
from airflow.hooks.base_hook import BaseHook
Expand Down

0 comments on commit f1a9a0e

Please sign in to comment.