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


Python Subscriptions.get_subscriptions_for_uri方法代碼示例

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


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

示例1: profile

# 需要導入模塊: from h.notification.models import Subscriptions [as 別名]
# 或者: from h.notification.models.Subscriptions import get_subscriptions_for_uri [as 別名]
 def profile(self):
     request = self.request
     user_id = request.authenticated_userid
     subscriptions = Subscriptions.get_subscriptions_for_uri(
         request,
         user_id
     )
     return {'model': {'subscriptions': subscriptions}}
開發者ID:Forethinker,項目名稱:h,代碼行數:10,代碼來源:views.py

示例2: profile

# 需要導入模塊: from h.notification.models import Subscriptions [as 別名]
# 或者: from h.notification.models.Subscriptions import get_subscriptions_for_uri [as 別名]
 def profile(self):
     request = self.request
     model = {}
     userid = request.authenticated_userid
     if request.registry.feature('notification'):
         model['subscriptions'] = Subscriptions.get_subscriptions_for_uri(
             request,
             userid
         )
     return {'model': model}
開發者ID:bradparks,項目名稱:h,代碼行數:12,代碼來源:views.py

示例3: profile

# 需要導入模塊: from h.notification.models import Subscriptions [as 別名]
# 或者: from h.notification.models.Subscriptions import get_subscriptions_for_uri [as 別名]
 def profile(self):
     request = self.request
     userid = request.authenticated_userid
     model = {}
     if userid:
         model["email"] = self.User.get_by_id(request, userid).email
     if request.registry.feature('notification'):
         model['subscriptions'] = Subscriptions.get_subscriptions_for_uri(
             request,
             userid
         )
     return {'model': model}
開發者ID:klrkdekira,項目名稱:h,代碼行數:14,代碼來源:views.py

示例4: profile

# 需要導入模塊: from h.notification.models import Subscriptions [as 別名]
# 或者: from h.notification.models.Subscriptions import get_subscriptions_for_uri [as 別名]
    def profile(self):
        """
        Return a serialisation of the user's profile.

        For use by the frontend. Includes current email and subscriptions data.
        """
        request = self.request
        userid = request.authenticated_userid
        model = {}
        if userid:
            model["email"] = User.get_by_id(request, userid).email
        if request.feature("notification"):
            model["subscriptions"] = Subscriptions.get_subscriptions_for_uri(userid)
        return {"model": model}
開發者ID:stuk88,項目名稱:h,代碼行數:16,代碼來源:views.py


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