Update extension imports to flask_*

See mitsuhiko/flask#1135
master
Steven Loria 9 years ago
parent 7fbb18e26b
commit 9f769fa43a
  1. 4
      {{cookiecutter.app_name}}/manage.py
  2. 2
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/assets.py
  3. 12
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/extensions.py
  4. 2
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/user/models.py

@ -3,8 +3,8 @@
import os import os
import sys import sys
import subprocess import subprocess
from flask.ext.script import Manager, Shell, Server from flask_script import Manager, Shell, Server
from flask.ext.migrate import MigrateCommand from flask_migrate import MigrateCommand
from {{cookiecutter.app_name}}.app import create_app from {{cookiecutter.app_name}}.app import create_app
from {{cookiecutter.app_name}}.user.models import User from {{cookiecutter.app_name}}.user.models import User

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from flask.ext.assets import Bundle, Environment from flask_assets import Bundle, Environment
css = Bundle( css = Bundle(
"libs/bootstrap/dist/css/bootstrap.css", "libs/bootstrap/dist/css/bootstrap.css",

@ -3,20 +3,20 @@
in app.py in app.py
""" """
from flask.ext.bcrypt import Bcrypt from flask_bcrypt import Bcrypt
bcrypt = Bcrypt() bcrypt = Bcrypt()
from flask.ext.login import LoginManager from flask_login import LoginManager
login_manager = LoginManager() login_manager = LoginManager()
from flask.ext.sqlalchemy import SQLAlchemy from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy() db = SQLAlchemy()
from flask.ext.migrate import Migrate from flask_migrate import Migrate
migrate = Migrate() migrate = Migrate()
from flask.ext.cache import Cache from flask_cache import Cache
cache = Cache() cache = Cache()
from flask.ext.debugtoolbar import DebugToolbarExtension from flask_debugtoolbar import DebugToolbarExtension
debug_toolbar = DebugToolbarExtension() debug_toolbar = DebugToolbarExtension()

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import datetime as dt import datetime as dt
from flask.ext.login import UserMixin from flask_login import UserMixin
from {{cookiecutter.app_name}}.extensions import bcrypt from {{cookiecutter.app_name}}.extensions import bcrypt
from {{cookiecutter.app_name}}.database import ( from {{cookiecutter.app_name}}.database import (

Loading…
Cancel
Save