-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanage.py
More file actions
30 lines (22 loc) · 816 Bytes
/
manage.py
File metadata and controls
30 lines (22 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""
Base terminal command manager.
Define terminal commands here to run actions
"""
from flask.ext.script import Manager, Server
from flask.ext.sqlalchemy import SQLAlchemy
# from flask.ext.migrate import Migrate, MigrateCommand
from system.init import initialize_app
# from system.init.database import create_database
import subprocess
import os
app = initialize_app()
manager = Manager(app)
# implement later, just creates database, needs to have mysql server installed
# @manager.option('-db', '--database', help='database name')
# def create_db(database):
# create_database(app, database)
#for windows run:
#pip install --allow-external mysql-connector-python -r system/dependenciesPC.txt
manager.add_command('runserver', Server(host='127.0.0.1'))
if __name__ == "__main__":
manager.run()