summaryrefslogtreecommitdiff
path: root/index.py
blob: 14260223ccef28daecc1490579316e4bad838cb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python
# -*- coding: utf-8 -*-

import sys

from app import app, db

try:
    cmd = sys.argv[1]
except IndexError:
    cmd = None

if cmd == "create":
    db.create_all()
elif cmd == "drop":
    db.drop_all()
elif cmd == "compile":
    app.jinja_env.compile_templates("comp", zip = None)
else:
    app.run()