Пример #1
0
import sys
import os.path
sys.path.insert(0, os.path.dirname(__file__))
from website import app as application, init_for
init_for('production')
Пример #2
0
import sys
from website import app, models, init_for
init_for('dev')
models.db.create_all()

try:
    port = int(sys.argv[1])
except (IndexError, ValueError):
    port = 3000
app.run('0.0.0.0', port=port, debug=True)
Пример #3
0
import sys
import os.path
sys.path.insert(0, os.path.dirname(__file__))
from website import app as application, init_for
import models

models.db.create_all()
init_for('production')