Fix deprecations

This commit is contained in:
Feliciaan De Palmenaer 2017-01-06 12:05:31 +01:00
parent e4b27f34f1
commit 6abd9614ab
9 changed files with 16 additions and 13 deletions

View file

@ -1,6 +1,6 @@
from flask.ext.admin import Admin
from flask.ext.admin.contrib.sqla import ModelView
from flask.ext import login
from flask_admin import Admin
from flask_admin.contrib.sqla import ModelView
import flask_login as login
from app import app, db

View file

@ -1,8 +1,8 @@
import logging
from logging.handlers import TimedRotatingFileHandler
from flask import Flask
from flask.ext.bootstrap import Bootstrap, StaticCDN
from flask.ext.sqlalchemy import SQLAlchemy
from flask_bootstrap import Bootstrap, StaticCDN
from flask_sqlalchemy import SQLAlchemy
from flask_debugtoolbar import DebugToolbarExtension
from airbrake import Airbrake, AirbrakeHandler

View file

@ -2,6 +2,7 @@
class Configuration(object):
SQLALCHEMY_DATABASE_URI = 'sqlite:///haldis.db'
SQLALCHEMY_TRACK_MODIFICATIONS = False
DEBUG = True
SECRET_KEY = '<change>'
SLACK_WEBHOOK = '<add url>'

View file

@ -1,8 +1,10 @@
from datetime import datetime, timedelta
from flask import session
from flask.ext.login import current_user
from flask_wtf import Form
from flask_login import current_user
from flask_wtf import FlaskForm as Form
from wtforms import SelectField, DateTimeField, validators, SubmitField, StringField
from models import User, Location
from utils import euro

View file

@ -8,8 +8,8 @@ from models import *
from forms import *
from utils import *
from views import *
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.script import Manager
from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager
if __name__ == '__main__':
# do it here, because make accessing db changes only possible when executing the program directly

View file

@ -1,5 +1,5 @@
from flask import redirect, abort, session, url_for
from flask.ext.login import LoginManager, current_user, logout_user
from flask_login import LoginManager, current_user, logout_user
from app import app

View file

@ -1,7 +1,7 @@
from datetime import datetime, timedelta
from flask import url_for, render_template, abort
from flask.ext.login import login_required
from flask_login import login_required
from app import app
from models import Order, Location

View file

@ -3,7 +3,7 @@ import json
from threading import Thread
import requests
from flask import url_for, render_template, abort, redirect, Blueprint, flash, session, request
from flask.ext.login import current_user, login_required
from flask_login import current_user, login_required
import random
from datetime import datetime

View file

@ -1,5 +1,5 @@
from flask import redirect, url_for, session, jsonify, flash, request
from flask.ext.login import login_user
from flask_login import login_user
from flask_oauthlib.client import OAuth, OAuthException
import json
import requests