Пример #1
0
def order_sent_listener(sender, **kwargs):
    """Listen to order payed signal.
    """
    order = sender
    mail_utils.send_order_sent_mail(order)
order_sent.connect(order_sent_listener)


def order_submitted_listener(sender, **kwargs):
    """Listen to order submitted signal.
    """
    request = kwargs.get("request")

    if getattr(settings, 'LFS_SEND_ORDER_MAIL_ON_CHECKOUT', True):
        mail_utils.send_order_received_mail(request, sender)
order_submitted.connect(order_submitted_listener)


def customer_added_listener(sender, **kwargs):
    """Listens to customer added signal.
    """
    mail_utils.send_customer_added(sender)
customer_added.connect(customer_added_listener)


def review_added_listener(sender, **kwargs):
    """Listens to review added signal
    """
    mail_utils.send_review_added(sender)
review_added.connect(review_added_listener)
Пример #2
0
def order_sent_listener(sender, **kwargs):
    """Listen to order payed signal.
    """
    order = sender
    mail_utils.send_order_sent_mail(order)
order_sent.connect(order_sent_listener)


def order_submitted_listener(sender, **kwargs):
    """Listen to order submitted signal.
    """
    request = kwargs.get("request")

    if getattr(settings, 'LFS_SEND_ORDER_MAIL_ON_CHECKOUT', True):
        mail_utils.send_order_received_mail(request, sender)
order_submitted.connect(order_submitted_listener)


def customer_added_listener(sender, **kwargs):
    """Listens to customer added signal.
    """
    mail_utils.send_customer_added(sender)
customer_added.connect(customer_added_listener)


def review_added_listener(sender, **kwargs):
    """Listens to review added signal
    """
    mail_utils.send_review_added(sender)
review_added.connect(review_added_listener)