当前位置: 首页>>代码示例>>Python>>正文


Python T.ol方法代码示例

本文整理汇总了Python中pushmaster.taglib.T.ol方法的典型用法代码示例。如果您正苦于以下问题:Python T.ol方法的具体用法?Python T.ol怎么用?Python T.ol使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pushmaster.taglib.T的用法示例。


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

示例1: get

# 需要导入模块: from pushmaster.taglib import T [as 别名]
# 或者: from pushmaster.taglib.T import ol [as 别名]
    def get(self, email):
        email = urllib.unquote_plus(email)

        doc = common.Document(title='pushmaster: recent activity: ' + email)

        doc.body(T.div(class_='bookmarklet')(common.bookmarklet(self.hostname)))

        user = users.User(email)

        requests = query.requests_for_user(user)
        pushes = query.pushes_for_user(user)

        if requests:
            doc.body(
                T.h3('Recent Requests'),
                T.ol(class_='my requests')(map(request_item, requests)),
                )

        if pushes:
            doc.body(
                T.h3('Recent Pushes'),
                T.ol(class_='pushes')(map(push_item, pushes)),
                )

        doc.serialize(self.response.out)
开发者ID:Yelp,项目名称:PushmasterApp,代码行数:27,代码来源:home.py

示例2: get

# 需要导入模块: from pushmaster.taglib import T [as 别名]
# 或者: from pushmaster.taglib.T import ol [as 别名]
    def get(self):
        doc = common.Document(title='pushmaster: recent pushes')

        pushes = query.open_pushes()

        doc.body(T.h1('Recent Pushes'), T.ol(map(push_item, pushes), class_='requests'))
        doc.serialize(self.response.out)
开发者ID:Yelp,项目名称:PushmasterApp,代码行数:9,代码来源:push.py

示例3: get

# 需要导入模块: from pushmaster.taglib import T [as 别名]
# 或者: from pushmaster.taglib.T import ol [as 别名]
    def get(self, datestr):
        from_date, to_date = report_date_range(datestr)

        doc = common.Document(title='pushmaster: reports')
        doc.body(T.h1('Report for ', from_date.strftime('%e %b %Y'), ' - ', to_date.strftime('%e %b %Y')))

        pushes = query.pushes_for_the_week_of(from_date)
        for push in pushes:
            pushdiv = T.div(class_='push')
            pushdiv(T.h2(
                    T.a(href=push.uri)(
                        push.ltime.replace(tzinfo=timezone.UTC()).astimezone(config.timezone).strftime('%a, %l:%M %p, %e %b %Y'),
                        T.span(' '),
                        push.name or '',
                        ), 
                    T.span(' by '),
                    common.display_user_email(push.owner),
                    ))
            reqlist = T.ol(class_='requests')
            for request in query.push_requests(push):
                reqlist(common.request_item(request))
            pushdiv(reqlist)
            doc.body(pushdiv)

        doc.body(common.jquery_js, common.jquery_ui_js, common.pushmaster_js)

        doc.serialize(self.response.out)
开发者ID:wingerz,项目名称:pushmaster,代码行数:29,代码来源:report.py

示例4: get

# 需要导入模块: from pushmaster.taglib import T [as 别名]
# 或者: from pushmaster.taglib.T import ol [as 别名]
 def get(self):
     doc = common.Document(title="pushmaster: today's pushes")
     
     pushes = query.live_pushes_today()
     
     doc.body(T.h1("Today's Pushes"), T.ol(map(push_item_full, pushes)))
     self.dispatch_daily_push_report_email(doc)
     doc.serialize(self.response.out)
开发者ID:alanf,项目名称:PushmasterApp,代码行数:10,代码来源:push.py

示例5: get

# 需要导入模块: from pushmaster.taglib import T [as 别名]
# 或者: from pushmaster.taglib.T import ol [as 别名]
    def get(self):
        doc = common.Document(title='pushmaster: pushes')
        
        pushes = query.open_pushes()

        push_list = T.ol(map(push_item, pushes))
        
        doc.body(T.h1('Recent Pushes'))
        doc.body(push_list)
        doc.body(common.jquery_js, common.jquery_ui_js, common.pushmaster_js)
        doc.serialize(self.response.out)
开发者ID:wingerz,项目名称:pushmaster,代码行数:13,代码来源:push.py

示例6: push_item

# 需要导入模块: from pushmaster.taglib import T [as 别名]
# 或者: from pushmaster.taglib.T import ol [as 别名]
def push_item(push):
    requests = query.push_requests(push)
    return T.li(class_='push')(
        T.div(
            common.display_datetime(push.ptime),
            T.a(href=push.uri)(push.name or 'push'),
            common.user_home_link(push.owner, logic.user_info(push.owner)),
            T.span(class_='state')(common.display_push_state(push)),
            class_='headline',
            ),
        T.ol(map(common.request_item, requests)) if requests else T.div('No requests.'),
    )
开发者ID:Yelp,项目名称:PushmasterApp,代码行数:14,代码来源:push.py

示例7: push_pending_list

# 需要导入模块: from pushmaster.taglib import T [as 别名]
# 或者: from pushmaster.taglib.T import ol [as 别名]
def push_pending_list(push, requests):
    is_push_owner = users.get_current_user() == push.owner
    def request_item(request):
        li = common.request_item(request)
        if is_push_owner:
            li.children.insert(0, T.div(class_='actions')(
                    T.form(class_='small', action=request.uri, method='post')(
                        T.div(class_='fields')(
                            T.button(type='submit')('Accept'),
                            common.hidden(push=str(push.key()), act='accept')),
                        ),
                    T.span('or', class_='sep'),
                    reject_request_link(request),
                    ),
               )
        return li
    ol = T.ol(class_='requests')
    if requests:
        ol(map(request_item, requests))
    return ol
开发者ID:Yelp,项目名称:PushmasterApp,代码行数:22,代码来源:push.py

示例8: accepted_list

# 需要导入模块: from pushmaster.taglib import T [as 别名]
# 或者: from pushmaster.taglib.T import ol [as 别名]
def accepted_list(accepted, request_item=common.request_item, state=''):
    return T.ol(class_=' '.join(['requests', state]))(map(request_item, accepted))
开发者ID:Yelp,项目名称:PushmasterApp,代码行数:4,代码来源:push.py

示例9: request_list

# 需要导入模块: from pushmaster.taglib import T [as 别名]
# 或者: from pushmaster.taglib.T import ol [as 别名]
def request_list(requests):
    return T.ol(class_='requests')(map(request_item, requests))
开发者ID:alanf,项目名称:PushmasterApp,代码行数:4,代码来源:common.py

示例10: accepted_list

# 需要导入模块: from pushmaster.taglib import T [as 别名]
# 或者: from pushmaster.taglib.T import ol [as 别名]
def accepted_list(accepted, request_item=common.request_item):
    return T.ol(class_='accepted requests')(map(request_item, accepted))
开发者ID:wingerz,项目名称:pushmaster,代码行数:4,代码来源:push.py


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