forked from byceps/byceps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
31 lines (25 loc) · 999 Bytes
/
app.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
"""
application instance
~~~~~~~~~~~~~~~~~~~~
:Copyright: 2014-2023 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from byceps.application import create_cli_app
from byceps.services.shop.order import order_service
from byceps.services.shop.order.models.order import (
PaymentState as OrderPaymentState,
)
from byceps.services.ticketing.ticket_service import find_ticket_by_code
from byceps.services.user import user_service
app = create_cli_app()
@app.shell_context_processor
def extend_shell_context():
"""Provide common objects to make available in the application shell."""
return {
'app': app,
'find_order_by_order_number': order_service.find_order_by_order_number,
'OrderPaymentState': OrderPaymentState,
'find_ticket_by_code': find_ticket_by_code,
'find_db_user_by_screen_name': user_service.find_db_user_by_screen_name,
'find_user_by_screen_name': user_service.find_user_by_screen_name,
}