I know that you can do that without flask-script, but the point of this script is that you can do so much more from this starting point. Notice for example that I'm trying to load flask-lesscss and execute it (which won't work, but won't fail if you don't have lesscss installed.)
To get the application (in the 'application' module) running you just need to do one of the following:
python manager.py dev python manager.py test python manager.py zen
I show how to add shell access in the second article in this series. Meanwhile why not let us see what you have in your manager script?
from flaskext.script import Manager, Server from flaskext.zen import Test, ZenTest import application app = application.create_app() manager = Manager(app) class DevServer(Server): def handle(self, app, host, port, use_debugger, use_reloader): try: from flaskext.lesscss import lesscss lesscss(app) except: pass app.run(host=host, port=port, debug=use_debugger, use_debugger=use_debugger, use_reloader=use_reloader, **self.server_options) if __name__ == "__main__": manager.add_command("dev", DevServer()) manager.add_command('test', Test()) manager.add_command('zen', ZenTest()) manager.run()
No comments:
Post a Comment