• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python utils.purchase_list函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中mkt.account.utils.purchase_list函数的典型用法代码示例。如果您正苦于以下问题:Python purchase_list函数的具体用法?Python purchase_list怎么用?Python purchase_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了purchase_list函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: _test

 def _test(self, type, exists):
     Installed.objects.create(user=self.user, addon=self.app,
                              install_type=type)
     if exists:
         eq_(list(purchase_list(self.req, self.user, None)[0].object_list),
             [self.app])
     else:
         assert not purchase_list(self.req, self.user, None)[0].object_list
开发者ID:j-barron,项目名称:zamboni,代码行数:8,代码来源:test_utils_.py


示例2: user_activity

def user_activity(request, user_id):
    """Shows the user activity page for another user."""
    user = get_object_or_404(UserProfile, pk=user_id)
    products, contributions, listing = purchase_list(request, user, None)
    is_admin = acl.action_allowed(request, "Users", "Edit")

    collections = Collection.objects.filter(author=user_id)
    user_items = ActivityLog.objects.for_user(user).exclude(action__in=amo.LOG_HIDE_DEVELOPER)
    admin_items = ActivityLog.objects.for_user(user).filter(action__in=amo.LOG_HIDE_DEVELOPER)
    amo.log(amo.LOG.ADMIN_VIEWED_LOG, request.amo_user, user=user)
    return jingo.render(
        request,
        "lookup/user_activity.html",
        {
            "pager": products,
            "account": user,
            "is_admin": is_admin,
            "listing_filter": listing,
            "collections": collections,
            "contributions": contributions,
            "single": bool(None),
            "user_items": user_items,
            "admin_items": admin_items,
            "show_link": False,
        },
    )
开发者ID:vinu76jsr,项目名称:zamboni,代码行数:26,代码来源:views.py


示例3: user_purchases

def user_purchases(request, user_id):
    """Shows the purchase page for another user."""
    user = get_object_or_404(UserProfile, pk=user_id)
    is_admin = acl.action_allowed(request, 'Users', 'Edit')
    products = purchase_list(request, user)
    return render(request, 'lookup/user_purchases.html',
                  {'pager': products, 'account': user, 'is_admin': is_admin,
                   'single': bool(None), 'show_link': False})
开发者ID:waseem18,项目名称:zamboni,代码行数:8,代码来源:views.py


示例4: test_contribution_installed_same_app

 def test_contribution_installed_same_app(self):
     self.user.installed_set.create(
         webapp=self.app,
         install_type=apps.INSTALL_TYPE_USER)
     self.user.contribution_set.create(
         webapp=self.app,
         type=mkt.CONTRIB_PURCHASE)
     eq_(list(purchase_list(self.req, self.user).object_list), [self.app])
开发者ID:shahbaz17,项目名称:zamboni,代码行数:8,代码来源:test_utils_.py


示例5: test_ordering

 def test_ordering(self):
     self.user.installed_set.create(
         webapp=self.app,
         install_type=apps.INSTALL_TYPE_USER)
     app2 = app_factory()
     self.user.installed_set.create(
         webapp=app2,
         install_type=apps.INSTALL_TYPE_USER)
     eq_(list(purchase_list(self.req, self.user).object_list),
         [app2, self.app])
开发者ID:shahbaz17,项目名称:zamboni,代码行数:10,代码来源:test_utils_.py


示例6: purchases

def purchases(request, user_id):
    """Shows the purchase page for another user."""
    user = get_object_or_404(UserProfile, pk=user_id)
    products, contributions, listing = purchase_list(request, user, None)
    return jingo.render(request, 'acct_lookup/purchases.html',
                        {'pager': products,
                         'account': user,
                         'listing_filter': listing,
                         'contributions': contributions,
                         'single': bool(None),
                         'show_link': False})
开发者ID:icaaq,项目名称:zamboni,代码行数:11,代码来源:views.py


示例7: activity

def activity(request, user_id):
    """Shows the user activity page for another user."""
    user = get_object_or_404(UserProfile, pk=user_id)
    products, contributions, listing = purchase_list(request, user, None)

    collections = Collection.objects.filter(author=user_id)

    return jingo.render(request, 'acct_lookup/activity.html',
                        {'pager': products,
                         'account': user,
                         'listing_filter': listing,
                         'collections': collections,
                         'contributions': contributions,
                         'single': bool(None),
                         'show_link': False})
开发者ID:gedex,项目名称:zamboni,代码行数:15,代码来源:views.py


示例8: purchases

def purchases(request, user_id):
    """Shows the purchase page for another user."""
    user = get_object_or_404(UserProfile, pk=user_id)
    products, contributions, listing = purchase_list(request, user, None)
    return jingo.render(
        request,
        "acct_lookup/purchases.html",
        {
            "pager": products,
            "listing_filter": listing,
            "contributions": contributions,
            "single": bool(None),
            "show_link": False,
        },
    )
开发者ID:canuckistani,项目名称:zamboni,代码行数:15,代码来源:views.py


示例9: user_activity

def user_activity(request, user_id):
    """Shows the user activity page for another user."""
    user = get_object_or_404(UserProfile, pk=user_id)
    products = purchase_list(request, user)
    is_admin = acl.action_allowed(request, 'Users', 'Edit')

    user_items = ActivityLog.objects.for_user(user).exclude(
        action__in=mkt.LOG_HIDE_DEVELOPER)
    admin_items = ActivityLog.objects.for_user(user).filter(
        action__in=mkt.LOG_HIDE_DEVELOPER)
    mkt.log(mkt.LOG.ADMIN_VIEWED_LOG, request.user, user=user)
    return render(request, 'lookup/user_activity.html',
                  {'pager': products, 'account': user, 'is_admin': is_admin,
                   'single': bool(None),
                   'user_items': user_items, 'admin_items': admin_items,
                   'show_link': False})
开发者ID:waseem18,项目名称:zamboni,代码行数:16,代码来源:views.py


示例10: user_purchases

def user_purchases(request, user_id):
    """Shows the purchase page for another user."""
    user = get_object_or_404(UserProfile, pk=user_id)
    is_admin = acl.action_allowed(request, "Users", "Edit")
    products, contributions, listing = purchase_list(request, user, None)
    return jingo.render(
        request,
        "lookup/user_purchases.html",
        {
            "pager": products,
            "account": user,
            "is_admin": is_admin,
            "listing_filter": listing,
            "contributions": contributions,
            "single": bool(None),
            "show_link": False,
        },
    )
开发者ID:vinu76jsr,项目名称:zamboni,代码行数:18,代码来源:views.py


示例11: user_activity

def user_activity(request, user_id):
    """Shows the user activity page for another user."""
    user = get_object_or_404(UserProfile, pk=user_id)
    products, contributions, listing = purchase_list(request, user, None)
    is_admin = acl.action_allowed(request, 'Users', 'Edit')

    collections = Collection.objects.filter(author=user_id)
    user_items = ActivityLog.objects.for_user(user).exclude(
        action__in=amo.LOG_HIDE_DEVELOPER)
    admin_items = ActivityLog.objects.for_user(user).filter(
        action__in=amo.LOG_HIDE_DEVELOPER)
    amo.log(amo.LOG.ADMIN_VIEWED_LOG, request.amo_user, user=user)
    return jingo.render(request, 'lookup/user_activity.html',
                        {'pager': products,
                         'account': user,
                         'is_admin': is_admin,
                         'listing_filter': listing,
                         'collections': collections,
                         'contributions': contributions,
                         'single': bool(None),
                         'user_items': user_items,
                         'admin_items': admin_items,
                         'show_link': False})
开发者ID:chrisdavidmills,项目名称:zamboni,代码行数:23,代码来源:views.py


示例12: test_contribution_chargeback

 def test_contribution_chargeback(self):
     self.user.contribution_set.create(
         webapp=self.app,
         type=mkt.CONTRIB_CHARGEBACK)
     eq_(list(purchase_list(self.req, self.user).object_list), [self.app])
开发者ID:shahbaz17,项目名称:zamboni,代码行数:5,代码来源:test_utils_.py


示例13: test_developer

 def test_developer(self):
     self.user.installed_set.create(
         webapp=self.app,
         install_type=apps.INSTALL_TYPE_DEVELOPER)
     eq_(list(purchase_list(self.req, self.user).object_list), [self.app])
开发者ID:shahbaz17,项目名称:zamboni,代码行数:5,代码来源:test_utils_.py


示例14: test_reviewer

 def test_reviewer(self):
     self.user.installed_set.create(
         webapp=self.app,
         install_type=apps.INSTALL_TYPE_REVIEWER)
     eq_(list(purchase_list(self.req, self.user).object_list), [])
开发者ID:shahbaz17,项目名称:zamboni,代码行数:5,代码来源:test_utils_.py


示例15: test_contribution_purchase

 def test_contribution_purchase(self):
     self.user.contribution_set.create(
         webapp=self.app,
         type=mkt.CONTRIB_PURCHASE)
     eq_(list(purchase_list(self.req, self.user).object_list), [self.app])
开发者ID:shahbaz17,项目名称:zamboni,代码行数:5,代码来源:test_utils_.py


示例16: test_user

 def test_user(self):
     self.user.installed_set.create(
         addon=self.app,
         install_type=apps.INSTALL_TYPE_USER)
     eq_(list(purchase_list(self.req, self.user).object_list), [self.app])
开发者ID:Fjoerfoks,项目名称:zamboni,代码行数:5,代码来源:test_utils_.py


示例17: test_contribution_refund

 def test_contribution_refund(self):
     self.user.contribution_set.create(
         webapp=self.app,
         type=mkt.CONTRIB_REFUND)
     eq_(list(purchase_list(self.req, self.user).object_list), [self.app])
开发者ID:shahbaz17,项目名称:zamboni,代码行数:5,代码来源:test_utils_.py



注:本文中的mkt.account.utils.purchase_list函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python base.get_url函数代码示例发布时间:2022-05-27
下一篇:
Python acl.check_reviewer函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap