<s> from django . conf import settings <EOL> from lfs . core . signals import customer_added <EOL> from lfs . core . signals import order_submitted <EOL> from lfs . core . signals import order_sent <EOL> from lfs . core . signals import order_paid <EOL> from lfs . mail import utils as mail_utils <EOL> from reviews . signals import review_added <EOL> def order_paid_listener ( sender , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> order = sender <EOL> mail_utils . send_order_paid_mail ( order ) <EOL> order_paid . connect ( order_paid_listener ) <EOL> def order_sent_listener ( sender , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> order = sender <EOL> mail_utils . send_order_sent_mail ( order ) <EOL> order_sent . connect ( order_sent_listener ) <EOL> def order_submitted_listener ( sender , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> request = kwargs . get ( "<STR_LIT>" ) <EOL> if getattr ( settings , '<STR_LIT>' , True ) : <EOL> mail_utils . send_order_received_mail ( request , sender ) <EOL> order_submitted . connect ( order_submitted_listener ) <EOL> def customer_added_listener ( sender , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> mail_utils . send_customer_added ( sender ) <EOL> customer_added . connect ( customer_added_listener ) <EOL> def review_added_listener ( sender , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> mail_utils . send_review_added ( sender ) <EOL> review_added . connect ( review_added_listener ) </s>
