我尝试在heroku上传一个烧瓶应用但我无法尝试命令" heroku run init"和#34; heroku运行python manage.py db create"但得到错误
Traceback (most recent call last):
File "manage.py", line 3, in <module>
from flask.ext.migrate import Migrate, MigrateCommand
ImportError: No module named flask.ext.migrate
虽然我可以在本地运行我的应用程序而且我有瓶子 - 在requirements.txt上迁移你能告诉我为什么我得到这个错误,我怎么能这样解决? manage.py:
import os
from flask.ext.migrate import Migrate, MigrateCommand
from app import create_app
from flask.ext.script import Manager
from app import db
from app.model import Users
app = create_app(os.environ['FLASK_CONFIG'] or 'default')
magrate = Migrate(app, db)
manager = Manager(app)
manager.add_command('db', MigrateCommand)
@manager.command
def init_db():
db.drop_all()
db.create_all()
@manager.command
def test():
from subprocess import call
call(['nosetests', '-v',
'--with-coverage', '--cover-package=app', '--cover-branches',
'--cover-erase', '--cover-html', '--cover-html-dir=cover'])
if __name__ == '__main__':
manager.run()
我运行命令heroku run pip freeze
Running `pip freeze` attached to terminal... up, run.4217