这是源码:
# coding=utf-8
from flask_script import Manager
from app import create_app, db
from flask_migrate import Migrate, MigrateCommand
app = create_app()
manager = Manager(app)
migrate = Migrate(app, db)
manager.add_command('db', MigrateCommand)
@manager.command
def dev():
from livereload import Server
live_server = Server(app.wsgi_app)
live_server.watch('**/*.*')
live_server.serve(open_url=True)
@manager.command
def test():
pass
@manager.command
def deploy():
pass
if __name__ == '__main__':
manager.run()
运行时就报错了:(求解答)
(virtualenv) E:\Dome\Django\item\test_1>python manager.py db migrate -m 'initial migration'
usage: manager.py [-?] {shell,deploy,db,dev,runserver,test} ...
manager.py: error: too many arguments
한번 해보세요
으아아아매개변수가 너무 많은 오류로 인해 매우 실망스럽습니다. 다음
-m '...'
을 직접 삭제하여 작동하는지 확인할 수도 있습니다.