-
Notifications
You must be signed in to change notification settings - Fork 3
/
manage.py
40 lines (32 loc) · 1.02 KB
/
manage.py
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
37
38
39
40
"""Modulo para criar os comandos de inicialização da aplicação."""
from flask_script import Manager
from sistema_hotel import app
from sistema_hotel.models.insertions import (insert_rooms,
insert_orders,
insert_resident,
insert_services,
insert_employee,
insert_resident_account,
insert_category)
manager = Manager(app)
@manager.command
def runserver():
app.run(debug=True, host="192.168.0.4", port=5000)
@manager.command
def insertions():
insert_rooms()
insert_category()
insert_employee()
insert_services()
insert_resident()
insert_resident_account()
insert_orders()
@manager.command
def orders():
insert_orders()
@manager.command
def rooms():
insert_rooms()
if __name__ == '__main__':
manager.run()
runserver()