Ejemplo n.º 1
0
    def _on_registered_status(self, customer):
        # send email to customer

        # TODO: create a factory or static wrapper that chooses test or control
        # based on the parameters passed to instantiate it (ex: customer).
        if customer.control_group:
            status_message = ControlCreatedCustomerMessage(customer)
        else:
            status_message = TestCreatedCustomerMessage(customer)

        redflag.send_email_to_customer(customer, status_message.subject,
                                       status_message.body_text)

        # send notification email to us
        # TODO: Pull subject and body_test from a StatusMesage
        redflag.send_email_to_notification_account(
            unicode("Customer Created"), customer.email,
            unicode("Somebody just signed up and sent us a task. Body "
                    "text required."))
Ejemplo n.º 2
0
    def _on_registered_status(self, customer):
        # send email to customer

        # TODO: create a factory or static wrapper that chooses test or control
        # based on the parameters passed to instantiate it (ex: customer).
        if customer.control_group:
            status_message = ControlCreatedCustomerMessage(customer)
        else:
            status_message = TestCreatedCustomerMessage(customer)

        redflag.send_email_to_customer(
                customer,
                status_message.subject,
                status_message.body_text)

        # send notification email to us
        # TODO: Pull subject and body_test from a StatusMesage
        redflag.send_email_to_notification_account(
                unicode("Customer Created"),
                customer.email,
                unicode("Somebody just signed up and sent us a task. Body "
                        "text required."))
Ejemplo n.º 3
0
 def _on_created_status(self, instance):
     # send notification email to us
     # TODO: Pull subject and body_test from a StatusMesage
     redflag.send_email_to_notification_account(unicode("Task Created"),
                                                instance.title, instance)
Ejemplo n.º 4
0
 def _on_rejected_status(self, instance):
     # everything is manual on rejection so just let us know.
     redflag.send_email_to_notification_account(unicode("Task Rejected"),
                                                instance.title, instance)