Example #1
0
def alert_editor_of_newclient(sender, user, request, **kwargs):
    subject = 'New Client Signup'
    client_email = user.email
    recipients = []
    for profile in UserProfile.objects.filter(user_type = 'Editor'):
        recipients.append(profile.user.email)
    new_client_alert.delay(settings.DEFAULT_FROM_EMAIL, recipients, subject, client_email)
Example #2
0
def alert_editor_of_newclient(sender, user, request, **kwargs):
    subject = 'New Client Signup'
    client_email = user.email
    recipients = []
    for profile in UserProfile.objects.filter(user_type='Editor'):
        recipients.append(profile.user.email)
    new_client_alert.delay(settings.DEFAULT_FROM_EMAIL, recipients, subject,
                           client_email)
Example #3
0
	def test_new_client_alert_task(self):
		subject = 'New Client Signup'
		text = '*****@*****.**'
		sender = settings.DEFAULT_FROM_EMAIL
		recipients = []
		for profile in UserProfile.objects.filter(user_type = 'Editor'):
			recipients.append(profile.user.email)
		result = new_client_alert.delay(recipients, text)
		self.assertTrue(result.successful())
Example #4
0
def alert_editor_of_newclient(sender, user, request, **kwargs):
    client_email = user.email
    recipients = []
    for profile in UserProfile.objects.filter(user_type = 'Editor'):
        recipients.append(profile.user.email)
    new_client_alert.delay(recipients, client_email)