-
Notifications
You must be signed in to change notification settings - Fork 25
/
manage.py
executable file
·45 lines (31 loc) · 739 Bytes
/
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
41
42
43
44
45
#!/usr/bin/env python3
import sys
from flask import Flask
from flask_script import Manager, Command
from app import app, db
from app import config
import threading
manager = Manager(app)
@manager.command
def install():
db.create_all()
@manager.command
def run():
app.run()
@manager.command
def start():
app.run(debug=True)
@manager.command
def donations(start=None, end=None):
import worker_donations
worker_donations.run(start, end)
@manager.command
def testmail():
from flask_mail import Message
from app import mail
msg = Message("Hello",
sender=config.mail_from,
recipients=config.admins)
mail.send(msg)
if __name__ == '__main__':
manager.run()