예제 #1
0
 def send_reminder_email(self):
     self.set_status(1)
     self.save()
     
     subject = "Don't forget to play The Drawing Game round that " + self.display_name + " sent you!"
     text_content = ""
     html_content = "To play your round, click <a href='" + settings.BASE_URL + "/game/" + self.round_code + "'>here</a>."
     
     send_email([self.email_address], subject=subject, text_content=text_content, html_content=html_content)
예제 #2
0
 def send_request(self):
     self.set_status(2)
     self.save()
 
     subject = self.email_address + " has not completed their round."
     text_content = ""           
     html_content = "To give " + self.email_address + " 24 more hours to complete the round, click <a href='" + settings.BASE_URL + "/wait/" + self.round_code + "'>here</a>.<br>"
     html_content += "To send this round to someone new, click <a href='" + settings.BASE_URL + "/reset/" + self.round_code + "'>here</a>."
     
     send_email([self.game.get_last_email()], subject=subject, text_content=text_content, html_content=html_content)
예제 #3
0
 def send_new_round_email(self, is_reset=False):
     subject = self.display_name + " has sent you a Drawing Game round!"
     text_content = ""
     html_content = "To play your round, click <a href='" + settings.BASE_URL + "/game/" + self.round_code + "'>here</a>."
     
     send_email([self.email_address], subject=subject, text_content=text_content, html_content=html_content)
     
     
     if self.round_number > 1 and is_reset == False:            
         subject = self.display_name + " has played their round!"
         to_emails = self.game.get_prev_emails()
         html_content = "When all rounds have been played, you can view your game <a href='" + settings.BASE_URL + "/view/" + self.game.game_code + "'>here</a>."
         
         send_email(to_emails, subject=subject, text_content=text_content, html_content=html_content)
예제 #4
0
 def send_round_over_email(self, expired=False):
     subject = "Your Drawing Game is over!" if expired == False else "Your Drawing Game has expired."
     text_content = ""
     html_content = "To view the completed game, click <a href='" + settings.BASE_URL + "/view/" + self.game_code + "'>here</a>."
     
     send_email(self.get_all_emails(), subject=subject, text_content=text_content, html_content=html_content)