本文整理汇总了Python中pybars._compiler.strlist函数的典型用法代码示例。如果您正苦于以下问题:Python strlist函数的具体用法?Python strlist怎么用?Python strlist使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了strlist函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: constant_11
def constant_11(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_7 = u'</span>\n </div>\n '
constant_6 = u'\n <div>\n <span class="nickname">'
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
value = helpers.get('nickname')
if value is None:
value = resolve(context, 'nickname')
if callable(value):
this = Scope(context, context)
value = value(this, )
elif value is None:
this = Scope(context, context)
value = helpers.get('helperMissing')(this, 'nickname', )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_7)
return result
示例2: constant_19
def constant_19(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_7 = u'coaches" class="tab-link has-icon no-recolor" rel="community coaches">Coaches</a></li>\n '
constant_6 = u'\n <li><a href="'
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
value = helpers.get('profileRoot')
if value is None:
value = resolve(context, 'profileRoot')
if callable(value):
this = Scope(context, context)
value = value(this, )
elif value is None:
this = Scope(context, context)
value = helpers.get('helperMissing')(this, 'profileRoot', )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_7)
return result
示例3: constant_6
def constant_6(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_7 = u'/v/'
constant_6 = u'\n<link itemprop="url" href="'
constant_8 = u'">\n'
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
value = resolve(context, "topic","","extended_slug")
if callable(value):
this = Scope(context, context)
value = value(this, )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_7)
value = resolve(context, "video","","readable_id")
if callable(value):
this = Scope(context, context)
value = value(this, )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_8)
return result
示例4: constant_10
def constant_10(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_7 = u'" class="simple-button action-gradient green">Log in to claim your profile</a>\n '
constant_6 = u'\n <a href="'
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
value = helpers.get('toLoginRedirectHref')
if value is None:
value = resolve(context, 'toLoginRedirectHref')
if callable(value):
this = Scope(context, context)
value = value(this, "/profile")
elif value is None:
this = Scope(context, context)
value = helpers.get('helperMissing')(this, 'toLoginRedirectHref', "/profile")
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_7)
return result
示例5: constant_7
def constant_7(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_7 = u'">'
constant_6 = u'\n<a href="'
constant_8 = u'</a>\n<span class="breadcrumb-separator">»</span>\n'
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
value = resolve(context, "","","url")
if callable(value):
this = Scope(context, context)
value = value(this, )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_7)
value = resolve(context, "","","title")
if callable(value):
this = Scope(context, context)
value = value(this, )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_8)
return result
示例6: constant_21
def constant_21(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_7 = u'">Log in</a> to add a coach!</h2>\n </div>\n <div class="no-discussion">\n <h2><a href=\'/#browse\'>Watch a video</a> and join the discussion!</h2>\n <p>Once you do, your questions will show up here.</p>\n </div>\n '
constant_6 = u'\n <div class="empty-graph">\n <h2><a href=\'/#browse\'>Watch a video</a> or <a href=\'/exercisedashboard\'>try a skill</a>!</h2>\n <p>Once you do, real data will show up here.</p>\n </div>\n <div class="error-graph">\n <h2>It\'s our fault.</h2>\n <p>Try again later, and please <a href=\'/reportissue?type=Defect\'>let us know</a> if it continues.</p>\n </div>\n <div class="no-coaches-for-phantoms">\n <h2><a href="'
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
value = helpers.get('toLoginRedirectHref')
if value is None:
value = resolve(context, 'toLoginRedirectHref')
if callable(value):
this = Scope(context, context)
value = value(this, "/profile")
elif value is None:
this = Scope(context, context)
value = helpers.get('helperMissing')(this, 'toLoginRedirectHref', "/profile")
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_7)
return result
示例7: constant_7
def constant_7(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_7 = u'\n <div class="fill green" style="width:100%;"></div>\n <div class="fill gray" style="width:'
constant_6 = u'\n '
constant_8 = u'%;"></div>\n <div class="fill blue just-earned" style="width:100%;"></div>\n '
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
result.append(constant_7)
value = helpers.get('multiply')
if value is None:
value = resolve(context, 'multiply')
if callable(value):
this = Scope(context, context)
value = value(this, resolve(context, "start"), 100)
elif value is None:
this = Scope(context, context)
value = helpers.get('helperMissing')(this, 'multiply', resolve(context, "start"), 100)
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_8)
return result
示例8: constant_14
def constant_14(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_9 = u'%</span>\n '
constant_7 = u'/'
constant_6 = u'\n <span class="objectives-complete">'
constant_8 = u'</span>\n ·\n <span class="percent-complete">'
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
value = helpers.get('objectiveProgress')
if value is None:
value = resolve(context, 'objectiveProgress')
if callable(value):
this = Scope(context, context)
value = value(this, )
elif value is None:
this = Scope(context, context)
value = helpers.get('helperMissing')(this, 'objectiveProgress', )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_7)
value = helpers.get('arrayLength')
if value is None:
value = resolve(context, 'arrayLength')
if callable(value):
this = Scope(context, context)
value = value(this, resolve(context, "objectives"))
elif value is None:
this = Scope(context, context)
value = helpers.get('helperMissing')(this, 'arrayLength', resolve(context, "objectives"))
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_8)
value = helpers.get('progressStr')
if value is None:
value = resolve(context, 'progressStr')
if callable(value):
this = Scope(context, context)
value = value(this, )
elif value is None:
this = Scope(context, context)
value = helpers.get('helperMissing')(this, 'progressStr', )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_9)
return result
示例9: constant_8
def constant_8(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_9 = u'\n'
constant_6 = u'\n\n'
def constant_7(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_6 = u'\n\n<span class="small-exercise-icon node-suggested" data-desc="You\'ve completed all the pre-requisites for this skill, so we think you\'re ready for it"></span>\n\n'
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
return result
def constant_8(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_6 = u'\n\n<span class="small-exercise-icon node-not-started" data-desc="This is a skill you can practice"></span>\n\n'
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
return result
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
options['helpers'] = helpers
options['partials'] = partials
options['inverse'] = partial(constant_8, helpers=helpers, partials=partials)
value = helper = helpers.get('if')
if value is None:
value = context.get('if')
if helper and callable(helper):
this = Scope(context, context)
value = value(this, options, resolve(context, "suggested"))
else:
helper = helpers['blockHelperMissing']
value = helper(context, options, value)
if value is None: value = ''
result.grow(value)
result.append(constant_9)
return result
示例10: constant_14
def constant_14(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_9 = u'</span></span></a></li>\n '
constant_7 = u'" data-tag="Topic Page Subtopic Library"><span class="indent"><span class=\'vid-progress v'
constant_6 = u'\n <li class="video-link"><a href="'
constant_8 = u"'>"
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
value = helpers.get('url')
if value is None:
value = resolve(context, 'url')
if callable(value):
this = Scope(context, context)
value = value(this, )
elif value is None:
this = Scope(context, context)
value = helpers.get('helperMissing')(this, 'url', )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_7)
value = helpers.get('key_id')
if value is None:
value = resolve(context, 'key_id')
if callable(value):
this = Scope(context, context)
value = value(this, )
elif value is None:
this = Scope(context, context)
value = helpers.get('helperMissing')(this, 'key_id', )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_8)
value = helpers.get('title')
if value is None:
value = resolve(context, 'title')
if callable(value):
this = Scope(context, context)
value = value(this, )
elif value is None:
this = Scope(context, context)
value = helpers.get('helperMissing')(this, 'title', )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_9)
return result
示例11: constant_7
def constant_7(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
return result
示例12: constant_10
def constant_10(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_6 = u'\n'
constant_8 = u'\n'
def constant_7(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_7 = u'" class="practice simple-button action-gradient green desktop-only" title="Extend your understanding with an exploration">Explore this concept</a>\n'
constant_6 = u'\n<a href="'
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
value = resolve(context, "video","","extra_properties","","explore_url")
if callable(value):
this = Scope(context, context)
value = value(this, )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_7)
return result
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
options['helpers'] = helpers
options['partials'] = partials
options['inverse'] = lambda this: None
value = helper = helpers.get('if')
if value is None:
value = context.get('if')
if helper and callable(helper):
this = Scope(context, context)
value = value(this, options, resolve(context, "video","","extra_properties","","explore_url"))
else:
helper = helpers['blockHelperMissing']
value = helper(context, options, value)
if value is None: value = ''
result.grow(value)
result.append(constant_8)
return result
示例13: constant_10
def constant_10(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_9 = u"'>"
constant_7 = u'/v/'
constant_6 = u'\n <label id="next_video">\n <a rel=next class="next-video" href="/'
constant_8 = u'"><b>Next Video:</b> <span class=\'vid-progress v'
constant_10 = u'</span> </a>\n </label>\n '
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
value = resolve(context, "topic","","extended_slug")
if callable(value):
this = Scope(context, context)
value = value(this, )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_7)
value = resolve(context, "video","","next_video","","readable_id")
if callable(value):
this = Scope(context, context)
value = value(this, )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_8)
value = resolve(context, "video","","next_video","","key_id")
if callable(value):
this = Scope(context, context)
value = value(this, )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_9)
value = resolve(context, "video","","next_video","","title")
if callable(value):
this = Scope(context, context)
value = value(this, )
if value is None: value = ''
if type(value) is not strlist:
value = escape(unicode(value))
result.grow(value)
result.append(constant_10)
return result
示例14: constant_22
def constant_22(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_6 = u'\n <div class="public">\n <h2>Oops, you\'re not allowed!</h2>\n <p>To view real data, you must be a coach.</p>\n </div>\n '
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
return result
示例15: constant_7
def constant_7(context, helpers=None, partials=None):
pybars = _pybars_
# Begin constants
constant_6 = u'\n\n<span class="small-exercise-icon node-suggested" data-desc="You\'ve completed all the pre-requisites for this skill, so we think you\'re ready for it"></span>\n\n'
# End constants
result = strlist()
if helpers is None: helpers = {}
helpers.update(pybars['helpers'])
if partials is None: partials = {}
result.append(constant_6)
return result