-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathrunserver.py
More file actions
36 lines (26 loc) · 792 Bytes
/
runserver.py
File metadata and controls
36 lines (26 loc) · 792 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
30
31
32
33
34
35
36
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask.ext.script import Manager
from fudcon.database import db
from fudcon.modules.speakers.models import Speaker # noqa
from fudcon.modules.rooms.models import Room # noqa
from fudcon.modules.sessions.models import Session # noqa
from fudcon.modules.contents.models import Content # noqa
from fudcon.modules.users.models import User # noqa
from fudcon.app import app
manager = Manager(app)
@manager.command
def create_database():
""" Create database """
db.drop_all()
db.create_all()
@manager.command
def destroy_database():
""" Destroy database """
db.drop_all()
@manager.command
def run():
""" Run application """
app.run(debug=True, host='0.0.0.0')
if __name__ == '__main__':
manager.run()