當前位置: 首頁>>代碼示例>>Python>>正文


Python Email.send_activation_email方法代碼示例

本文整理匯總了Python中models.Email.send_activation_email方法的典型用法代碼示例。如果您正苦於以下問題:Python Email.send_activation_email方法的具體用法?Python Email.send_activation_email怎麽用?Python Email.send_activation_email使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在models.Email的用法示例。


在下文中一共展示了Email.send_activation_email方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: post

# 需要導入模塊: from models import Email [as 別名]
# 或者: from models.Email import send_activation_email [as 別名]
 def post(self):
     action = self.request.get("action")
     if action == "reset":
         self.account.set_hash_and_key()
     elif action == "addemail":
         email = self.request.get("email")
         if not Email.find_existing(email):
             e = Email(email=self.request.get("email"), account=self.account)
             e.send_activation_email()
             e.put()
     elif action == "removeemail":
         e = Email.get_by_id(int(self.request.get("email-id")))
         if e.account.key() == self.account.key():
             if e.hash() in self.account.hashes:
                 self.account.hashes.remove(e.hash())
                 self.account.put()
             e.delete()
     else:
         if self.request.get("source_enabled", None):
             self.account.source_enabled = True
             self.account.source_name = self.request.get("source_name", None)
             self.account.source_url = self.request.get("source_url", None)
             self.account.source_icon = self.request.get("source_icon", None)
         else:
             self.account.source_enabled = False
     self.account.put()
     self.redirect("/settings")
開發者ID:Mondego,項目名稱:pyreco,代碼行數:29,代碼來源:allPythonContent.py


注:本文中的models.Email.send_activation_email方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。