Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 772 Bytes

sending_notifications.rst

File metadata and controls

23 lines (15 loc) · 772 Bytes

Sending notifications

Most of the time you'll want to notify customers via email when an order has been made or its status has changed. For that scenario, Salesman provides a :attr:`salesman.orders.signals.status_changed` signal that you can use. Eg:

Note

For this example, we assume your custom app is named shop.

.. literalinclude:: /../example/shop/signals.py

Make sure you import your signals in your app's ready function to have them registered:

.. literalinclude:: /../example/shop/apps.py
.. literalinclude:: /../example/shop/__init__.py

Read more about listening to signals in Django's docs.