0

I try to upload a flask application on heroku But I couldnt Try the command "heroku run init" and "heroku run python manage.py db create" But get the error

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

eventhough I can run my application Locally and I have flask-Migrate on the requirements.txt would you please tell me Why I get this error and How can I solve thus? 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()

I run command heroku run pip freeze

Running `pip freeze` attached to terminal... up, run.4217
LiLi
  • 301
  • 2
  • 7
  • 21

0 Answers0