-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathpatron.py
30 lines (24 loc) · 945 Bytes
/
patron.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
# Copyright (c) 2018 Jeff Vandrew Jr
from app import create_app, db, blog_engine
from app.email import send_reminder_emails
from app.models import User, BTCPayClientStore, PriceLevel, \
ThirdPartyServices, Email
from datetime import datetime, timedelta
from flask_blogging_patron.signals import editor_post_saved
app = create_app()
if __name__ == '__main__':
app.run(load_dotenv=True, ssl_context='adhoc')
@app.shell_context_processor
def make_shell_context():
return {
'db': db, 'User': User,
'editor_post_saved': editor_post_saved,
'blog_engine': blog_engine,
'Email': Email,
'ThirdPartyServices': ThirdPartyServices,
'BTCPayClientStore': BTCPayClientStore,
'PriceLevel': PriceLevel,
'send_reminder_emails': send_reminder_emails,
'tomorrow': datetime.today() + timedelta(hours=24),
'yesterday': datetime.today() - timedelta(hours=24),
}