forked from awesto/django-shop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorder_signals.py
22 lines (15 loc) · 858 Bytes
/
order_signals.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import django.dispatch
# Order-related signals
"""Emitted when the Cart was converted to an Order"""
processing = django.dispatch.Signal(providing_args=['order', 'cart'])
"""Emitted when the user is shown the "select a payment method" page """
payment_selection = django.dispatch.Signal(providing_args=['order'])
"""Emitted when the user finished placing his order (regardless of the payment
success or failure)"""
confirmed = django.dispatch.Signal(providing_args=['order'])
"""Emitted when the payment was received for the Order"""
completed = django.dispatch.Signal(providing_args=['order'])
"""Emitted if the payment was refused or other fatal problem"""
cancelled = django.dispatch.Signal(providing_args=['order'])
"""Emitted (manually) when the shop clerk or robot shipped the order"""
shipped = django.dispatch.Signal(providing_args=['order'])