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

Python html.escape函数代码示例

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

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



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

示例1: render_body

def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        self = context.get('self', UNDEFINED)
        next = context.get('next', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 2
        __M_writer(u'\n<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\n"http://www.w3.org/TR/html4/strict.dtd">\n<html>\n<head>\n    <title>')
        # SOURCE LINE 7
        __M_writer(escape(self.title()))
        __M_writer(u'</title>\n    ')
        # SOURCE LINE 8
        __M_writer(escape(self.head()))
        __M_writer(u'\n</head>\n<body>\n    ')
        # SOURCE LINE 11
        __M_writer(escape(self.header()))
        __M_writer(u'\n    ')
        # SOURCE LINE 12
        __M_writer(escape(self.heading()))
        __M_writer(u'\n    ')
        # SOURCE LINE 13
        __M_writer(escape(next.body()))
        __M_writer(u'\n</body>\n</html>\n\n')
        # SOURCE LINE 17
        __M_writer(u'\n')
        # SOURCE LINE 18
        __M_writer(u'\n')
        # SOURCE LINE 19
        __M_writer(u'\n')
        # SOURCE LINE 20
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
开发者ID:masayang,项目名称:pylons_rpx_simpledb,代码行数:35,代码来源:index.html.py


示例2: render_body

def render_body(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        c = context.get('c', UNDEFINED)
        dir = context.get('dir', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(u'\n<h2>Huzzah! You\'ve completed this assignment.</h2> <br/></br><h2> Nice work.</h2>\n\n<script type="text/javascript">    \n    function setup_js(){\n\n')
        if not 'assignment' in dir(c):
            if c.assignment.num_assigned and c.assignment.num_assigned > 0:
                __M_writer(u'            $("#progress").html("you\'ve screened <b>')
                __M_writer(escape(c.assignment.done_so_far))
                __M_writer(u'</b> out of <b>')
                __M_writer(escape(c.assignment.num_assigned))
                __M_writer(u'</b> so far (nice going!)");\n')
            else:
                __M_writer(u'            $("#progress").html("you\'ve screened <b>')
                __M_writer(escape(c.assignment.done_so_far))
                __M_writer(u'</b> abstracts thus far, and, regrettably, there are no more for you to screen.");\n')
        else:
            __M_writer(u'          $("#progress").html("");\n')
        __M_writer(u'\n\n        $(\'#buttons\').html("");\n        //alert("???");\n        $(\'#buttons\').remove()\n        $(\'#tags_container\').remove();\n        $(\'#label_terms\').remove();\n        \n    }\n</script>')
        return ''
    finally:
        context.caller_stack._pop_frame()
开发者ID:GuizhiShi,项目名称:Abstrackr,代码行数:25,代码来源:assignment_complete.mako.py


示例3: render_buildrow

def render_buildrow(context,tag,odd=True):
    context.caller_stack._push_frame()
    try:
        h = context.get('h', UNDEFINED)
        unicode = context.get('unicode', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 5
        __M_writer(u'\r\n    <tr class="')
        # SOURCE LINE 6
        __M_writer(escape(odd and 'odd' or 'even'))
        __M_writer(u'">\r\n        <td valign="top">\r\n            ')
        # SOURCE LINE 8
        __M_writer(escape(h.link_to(
                tag.id,
                h.url(
                    controller=u'tag',
                    action='view',
                    id=unicode(tag.id)
                )
            )))
        # SOURCE LINE 15
        __M_writer(u'\r\n        </td>\r\n        <td valign="top">\r\n            ')
        # SOURCE LINE 18
        __M_writer(escape(tag.name))
        __M_writer(u'\r\n        </td>\r\n    </tr>\r\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
开发者ID:saguitarius,项目名称:SimpleSite---saguitarius,代码行数:28,代码来源:list.html.py


示例4: render_body

def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        c = context.get('c', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\n\n')
        # SOURCE LINE 3
        __M_writer(u'\n\n\n')
        # SOURCE LINE 6
        for resource in c.resources:
            # SOURCE LINE 7
            __M_writer(u'<div class="content">\n        <h2> ')
            # SOURCE LINE 8
            __M_writer(escape(resource.title))
            __M_writer(u' </h2>\n        <strong style="display: none">')
            # SOURCE LINE 9
            __M_writer(escape(resource.name))
            __M_writer(u'</strong>\n        <p>Created at ')
            # SOURCE LINE 10
            __M_writer(escape(resource.created))
            __M_writer(u'</p>\n        <p>Modified at ')
            # SOURCE LINE 11
            __M_writer(escape(resource.modified))
            __M_writer(u'</p>\n        <p>\n          ')
            # SOURCE LINE 13
            __M_writer(escape(resource.description))
            __M_writer(u'\n        </p>\n</div>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
开发者ID:HyFrmn,项目名称:vault,代码行数:32,代码来源:index.mako.py


示例5: render_body

def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        h = context.get('h', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(escape(h.field(
  "Nickame",
  h.text(name = 'nickname'),
  required = False,
)))
        # SOURCE LINE 5
        __M_writer(u'\n\n')
        # SOURCE LINE 7
        __M_writer(escape(h.field(
  "Time Diff",
  h.text(name = 'time_diff'),
  required = False,
)))
        # SOURCE LINE 11
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
开发者ID:masayang,项目名称:pylons_rpx_simpledb,代码行数:25,代码来源:fields.html.py


示例6: render_body

def render_body(context):
    context.caller_stack._push_frame()
    try:
        h = context.get('h', UNDEFINED)
        c = context.get('c', UNDEFINED)
        enumerate = context.get('enumerate', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 5
        __M_writer(u'\n\t<h2>Seznam sout\u011b\u017e\xed</h2>\n\t<table class="dark">\n\t<thead>\n\t\t<th class="ns"></th>\n\t\t<th width=80%>N\xe1zev</th>\n\t\t<th>\u0158e\u0161itel\u016f</th>\n\t</thead>\n')
        # SOURCE LINE 13
        for i, task in enumerate(c.list):
            # SOURCE LINE 14
            __M_writer(u'\t\t<tr>\n\t\t\t<td class="ns">')
            # SOURCE LINE 15
            __M_writer(escape(i+1))
            __M_writer(u'</td>\n\t\t\t<td><a href=')
            # SOURCE LINE 16
            __M_writer(escape(h.url_for(controller="task", action="show", id=task.id)))
            __M_writer(u'>')
            __M_writer(escape(task.name))
            __M_writer(u'</a></td>\n\t\t\t<td style="text-align:center;">')
            # SOURCE LINE 17
            __M_writer(escape(c.okUsers(task.id)))
            __M_writer(u'</td>\n\t\t</tr>\n')
            pass
        # SOURCE LINE 20
        __M_writer(u'\t</table>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
开发者ID:Administrator37157192201,项目名称:DevContest,代码行数:30,代码来源:archivTasks.mako.py


示例7: render_body

def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        c = context.get('c', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'')
        # SOURCE LINE 2
        __M_writer(u'\n')
        # SOURCE LINE 3
        __M_writer(u'\n\n<ul id="titles">\n\n')
        # SOURCE LINE 7
        for pv in c.pvs:
            # SOURCE LINE 8
            __M_writer(u'\n  <li>\n        ')
            # SOURCE LINE 10
            __M_writer(escape(pv.st_id))
            __M_writer(u' | ')
            __M_writer(escape(pv.st_user_agent))
            __M_writer(u' | ')
            __M_writer(escape(pv.st_url))
            __M_writer(u' | ')
            __M_writer(escape(pv.st_spider_date))
            __M_writer(u'\n  </li>\n\n')
        # SOURCE LINE 14
        __M_writer(u'\n</ul>')
        return ''
    finally:
        context.caller_stack._pop_frame()
开发者ID:raygunsix,项目名称:tracking,代码行数:30,代码来源:index.mako.py


示例8: render_footer

def render_footer(context):
    context.caller_stack._push_frame()
    try:
        h = context.get('h', UNDEFINED)
        c = context.get('c', UNDEFINED)
        parent = context.get('parent', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 8
        __M_writer(u'\r\n')
        # SOURCE LINE 10
        __M_writer(u'<p>\r\n<a href="')
        # SOURCE LINE 11
        __M_writer(escape(h.url(controller='tag', action='edit', id=c.tag.id)))
        __M_writer(u'">Edit Tag</a>\r\n| <a href="')
        # SOURCE LINE 12
        __M_writer(escape(h.url(controller='tag', action='delete',
id=c.tag.id)))
        # SOURCE LINE 13
        __M_writer(u'">Delete Tag</a>\r\n</p>\r\n')
        # SOURCE LINE 16
        __M_writer(escape(parent.footer()))
        __M_writer(u'\r\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
开发者ID:saguitarius,项目名称:SimpleSite---saguitarius,代码行数:25,代码来源:view.html.py


示例9: render_body

def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        c = context.get('c', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'<script type="text/javascript">\n\t$(document).ready(function(){\n\t\tpage = new Page;\n')
        # SOURCE LINE 4
        if (c.curPropId):
            # SOURCE LINE 5
            __M_writer(u"\t\tproperty = new PropertySetup({propertyId:'")
            __M_writer(escape(c.curPropId))
            __M_writer(u"',unitId:'")
            __M_writer(escape(c.unitId))
            __M_writer(u"'});\n")
            # SOURCE LINE 6
        else:
            # SOURCE LINE 7
            __M_writer(u'        property = new PropertySetup;\n')
            pass
        # SOURCE LINE 9
        __M_writer(u'\t});\n</script>\n\n<!-- Page -->\n<div class="page" id="propertySetup">\n\n\t<div class="editMode">\n\t\t<a class="mini button" href="/property/view/')
        # SOURCE LINE 16
        __M_writer(escape(c.curPropId))
        __M_writer(u'" id="property-preview"><span><img src="/styles/img/ico/building.png" />View Property</span></a>\n\t\t<h1 id="edit-mode-text">You are in <strong>"property setup mode"</strong></h1>\n\t</div>\n\t\n\t<div class="leftColumn">\n\t\t\n\t\t<!-- Property Info -->\n\t\t<div class="propertyInfo pane" id="propertyInfo">\n\t\t\t\n\t\t\t<!-- edit -->\n\t\t\t<div class="edit pane" id="propertyInfoEdit">\n\t\t\t\t<div id="saveProperty" class="save">\n\t\t\t\t\t<div class="inputs">\n\t\t\t\t\t\t<label for="propertyName">Property Name<input type="text" name="name" id="propertyName" /></label>\n\t\t\t\t\t\t<label for="propertyStreet">Street<input type="text" name="street" id="propertyStreet" /></label>\n\t\t\t\t\t\t<label for="propertyCity">City<input type="text" name="city" id="propertyCity" /></label>\n\t\t\t\t\t\t<label for="propertyState" class="state">State<input type="text" name="state" id="propertyState" maxlength="2" /></label>\n\t\t\t\t\t\t<label for="propertyZip" class="zip">Zip<input type="text" name="zip" id="propertyZip" maxlength="10" /></label>\n\t\t\t\t\t\t<label for="propertyType" class="clear">\n\t\t\t\t\t\t\t<select id="propertyType">\n\t\t\t\t\t\t\t\t<option value="single">Single unit</option>\n\t\t\t\t\t\t\t\t<option value="multi">Multi unit</option>\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="uploadPlaceHolder" id="propertyPhotoEdit"><span id="uploadPropertyPhoto"></span><img src="" /></div>\n\t\t\t\t\t<div class="action">\n\t\t\t\t\t\t<a class="primary button" id="savePropertyButton"><span>Create Property</span></a>\n\t\t\t\t\t\t<a class="button fixedLength" id="savePropertyCancel"><span>Cancel</span></a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<!-- display -->\n\t\t\t<div class="display pane" id="propertyInfoDisplay">\n\t\t\t\t<div class="pic"><div class="thumb"><span class="frame"><img id="propertyPhotoDisplay" /></span></div></div>\n\t\t\t\t<div class="info">\n\t\t\t\t\t<h3 id="propertyNameLabel"></h3>\n\t\t\t\t\t<p><span id="propertyStreetLabel"></span><br /><span id="propertyCityLabel"></span>, <span id="propertyStateLabel"></span>, <span id="propertyZipLabel"></span></p>\n\t\t\t\t\t<div class="action">\n\t\t\t\t\t\t<a id="editPropertyButton" class="mini button"><span><img src="/styles/img/ico/building_edit.png" />Edit</span></a>\n\t\t\t\t\t\t<a id="deletePropertyLink" class="mini button"><span><img src="/styles/img/ico/delete.png" />Delete</span></a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t</div>\n\t\t\n\t\t<!-- Unit Maker -->\n\t\t<div class="unitMaker pane" id="unitMaker">\n\t\t\t\n\t\t\t<div class="input"><input type="text" alt="unit #s" id="unitsInput" /></div>\n\t\t\t<div class="action">\n\t\t\t\t<a class="button" id="unitMakerButton"><span>Add unit numbers</span></a>\n\t\t\t</div>\n\t\t\t<ul class="tips" id="unitMakerShortcuts">\n\t\t\t\t<div class="tooltipArrow"></div>\n\t\t\t\t<li class="header">Example Commands (samples)</li>\n\t\t\t\t<li><label>5, 15, 25</label>- adds units 5, 15 and 25</li>\n\t\t\t\t<li><label>101-150</label>- adds units from 101-150</li>\n\t\t\t\t<li><label>x 5, 15, 25</label>- deletes unit 5, 15, and 25</li>\n\t\t\t\t<li><label>x 101-150</label>- deletes units from 101-150</li>\n\t\t\t</ul>\n\t\t</div>\n\n\t</div>\n\n\t<div class="rightColumn">\n\t\n\t\t\n\t\t<!-- vertical unit list -->\n\t\t<div class="unit tooltip" id="unitTooltip">\n\t\t\t<div class="arrow"></div>\n\t\t\t<h5>Click on a Unit</h5>\n\t\t\t<p>You can click units to edit floorplans and upload unit photos.</p>\n\t\t</div>\n\t\t<div class="unitList pane" id="unitList">\n\t\t\t<!-- unit scroller (re-usable) -->\n\t\t\t<div class="unitScroller" id="unitScroller">\n\t\t\t\t<div class="label">Unit #</div>\n\t\t\t\t<div class="manualInput">\n\t\t\t\t\t<input type="text" alt="filter" />\n\t\t\t\t</div>\n\t\t\t\t<div class="scrollFrame" id="scrollFrame"><ul></ul></div>\n\t\t\t\t<div class="controls">\n\t\t\t\t\t<div class="slider"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!-- end unit scroller -->\n\n\t\t</div>\n\t\t<!-- unit info -->\n\t\t<div class="unitInfo pane" id="unitInfo">\n\t\t\t<div class="progress" id="progress">\n\t\t\t\t<div class="exitSetup" id="exitSetup">\n\t\t\t\t\t<a class="primary button" id="exitSetupButton"><span>Exit Setup</span></a>\n\t\t\t\t</div>\n\t\t\t\t<div class="bar"><span></span></div>\n\t\t\t\t<label></label>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class="unitbox" id="unitbox"><div class="wrap"><div class="wrap">\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<div class="edit" id="editFloorPlan">\n\t\t\t\t\t<h1 id="unitEditorLabel">Unit 101</h1>\n\t\t\t\t\t<div id="saveFloorPlan" class="save">\n\t\t\t\t\t\t<div class="inputs">\n\t\t\t\t\t\t\t<label for="floorPlanName">Floor Plan Name<input type="text" name="name" id="floorPlanName" alt="e.g. Fanciful" /></label>\n\t\t\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t\t\t<label for="sqft">Sqft<input type="text" name="sqft" id="sqft" /></label>\n\t\t\t\t\t\t\t\t<label for="beds">Br<input type="text" name="beds" id="beds" alt="e.g 2" /></label>\n\t\t\t\t\t\t\t\t<label for="baths">Ba<input type="text" name="baths" id="baths" alt="e.g. 2.5" /></label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<label for="floorPlanDescription">Floorplan Promotional Copy\n\t\t\t\t\t\t\t<em>Information here will be re-used in other places, such as advertising your unit on Craigslist.</em>\n\t\t\t\t\t\t\t<textarea name="description" cols="35" rows="5" id="floorPlanDescription"></textarea></label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="action">\n\t\t\t\t\t\t\t<a class="primary button fixedLength" id="saveFloorPlanButton"><span>Save</span></a>\n\t\t\t\t\t\t\t<a class="button fixedLength" id="saveFloorPlanCancel"><span>Cancel</span></a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div class="display" id="displayFloorPlan">\n\t\t\t\t\t\n\t\t\t\t\t<div class="unitedit">\n\t\t\t\t\t\t<div class="moremenu"><div class="wrap">\n\t\t\t\t\t\t\t<label></label>\n\t\t\t\t\t\t\t<div class="options">\n\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t<li id="editFloorPlanLink">Edit floor plan</li>\n\t\t\t\t\t\t\t\t\t<li id="renameUnitLink">Rename unit</li>\n\t\t\t\t\t\t\t\t\t<li id="deleteUnitLink">Delete unit</li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<h1 id="unitLabel"></h1>\n\t\t\t\t\t<div class="unitLabelInput" id="unitLabelRenamer">\n\t\t\t\t\t\t<input type="text" id="unitLabelInput" />\n\t\t\t\t\t\t<a class="button primary" id="unitRenameButton"><span>Save</span></a>\n\t\t\t\t\t\t<a class="button" id="unitRenameCancel"><span>Cancel</span></a>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<div class="filter">\n\t\t\t\t\t\t<div class="options"><div class="wrap"><ul id="floorPlanList"></ul></div></div>\n\t\t\t\t\t\t<div><label class="floorPlanLabel" id="floorPlanLabel"></label></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<div class="floorPlanInfo" id="floorPlanInfo">\n\t\t\t\t\t\t<div class="uploadPlaceHolder" id="floorPlanDisplayPhoto"><span id="uploadFloorPlanOnDisplay"></span><img src="" /></div>\n\t\t\t\t\t\t<div class="floorplan" id="floorPlan"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<div class="picViewer" id="unitPicViewer">\n\t\t\t\t\t\t<h3 id="unitPhotosLabel"></h3>\n\t\t\t\t\t\t<em>Photos here will be re-used in other places, such as advertising your unit on Craigslist.</em>\n\t\t\t\t\t\t<div class="droptext">Drop photos here!</div>\n\t\t\t\t\t\t<div class="picDisplay"><span class="frame"></span></div>\n\t\t\t\t\t\t<div class="picBar">\n\t\t\t\t\t\t\t<div class="picEditor">\n\t\t\t\t\t\t\t\t<div class="picOptions">\n\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t<li class="add" id="unitPicViewer-upload">Upload more</li>\n\t\t\t\t\t\t\t\t\t\t<li class="delete" id="unitPicViewer-delete">Delete this</li>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="picNav">\n\t\t\t\t\t\t\t\t<div class="left"><span>Previous</span></div>\n\t\t\t\t\t\t\t\t<div class="center">0 of 0</div>\n\t\t\t\t\t\t\t\t<div class="right"><span>Next</span></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div></div></div>\n\t\t\t\n\t\t\t\n\t\t</div>\n\t\t\n\t\t\n\t</div>\n\n</div>\n\n<div id="previewModal">\n\t<div class="close">Close Window</div>\n\t<img />\n</div>\n\n')
        # SOURCE LINE 213
        __M_writer(u'\n\n\n\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
开发者ID:weixiyen,项目名称:Rentfox,代码行数:31,代码来源:property_setup.html.py


示例10: render_body

def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        def user_list():
            return render_user_list(context.locals_(__M_locals))
        def group_list():
            return render_group_list(context.locals_(__M_locals))
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\r\n\r\n')
        # SOURCE LINE 3
        __M_writer(u'\r\n')
        # SOURCE LINE 4
        __M_writer(u'\r\n\r\n')
        # SOURCE LINE 6
        __M_writer(escape(user_list()))
        __M_writer(u'\r\n')
        # SOURCE LINE 7
        __M_writer(escape(group_list()))
        __M_writer(u'\r\n\r\n')
        # SOURCE LINE 50
        __M_writer(u'\r\n\r\n')
        # SOURCE LINE 92
        __M_writer(u'\r\n\r\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
开发者ID:saguitarius,项目名称:Purchase,代码行数:28,代码来源:manage_accounts.html.py


示例11: render_body

def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        environment = context.get('environment', UNDEFINED)
        sorted = context.get('sorted', UNDEFINED)
        parent = context.get('parent', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\n\n')
        # SOURCE LINE 5
        __M_writer(u'\n\n')
        # SOURCE LINE 7
        __M_writer(escape(parent.sidebar_top()))
        __M_writer(u'\n<h2>The WSGI nature of the framework</h2>\n  <p>In this page you can see all the WSGI variables your request object has, \n     the ones in capital letters are required by the spec, then a sorted by\n     component list of variables provided by the Components, and at last\n     the "wsgi." namespace with very useful information about your WSGI Server</p>\n  <p>The keys in the environment are: \n  <table>\n')
        # SOURCE LINE 15
        for key in sorted(environment):
            # SOURCE LINE 16
            __M_writer(u'      <tr>\n          <td>')
            # SOURCE LINE 17
            __M_writer(escape(key))
            __M_writer(u'</td>\n          <td>')
            # SOURCE LINE 18
            __M_writer(escape(environment[key]))
            __M_writer(u'</td>\n      </tr>\n')
            pass
        # SOURCE LINE 21
        __M_writer(u'  </table>\n\n  </p>\n\n\n')
        # SOURCE LINE 26
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
开发者ID:gutch,项目名称:OSTacct,代码行数:33,代码来源:environ.mak.py


示例12: render_body

def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        models = context.get('models', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\n\n')
        # SOURCE LINE 5
        __M_writer(u'\n\n<div style="height:0px;"> &nbsp; </div>\n    <h2>TurboGears Admin</h2>\n    This is a fully-configurable administrative tool to help you administer your website.\n    Below is links to all of your models.<br/>    They will bring you to a listing of the objects\n    in your database.\n\n<table class="admin_grid">\n')
        # SOURCE LINE 14
        for model in models:
            # SOURCE LINE 15
            __M_writer(u'    <tr py:for="model in models">\n      <td>\n        <a href=\'')
            # SOURCE LINE 17
            __M_writer(escape(model.lower()))
            __M_writer(u's/\' class="edit_link">')
            __M_writer(escape(model))
            __M_writer(u'</a>\n      </td>\n    </tr>\n')
            pass
        # SOURCE LINE 21
        __M_writer(u'</table>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
开发者ID:gutch,项目名称:OSTacct,代码行数:25,代码来源:index.mak.py


示例13: render_body

def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        c = context.get('c', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'<html>\n<head>\n  <title>Greetings</title>\n</head>\n<body>\n\t<form name="test" method="GET" action="/main/index">\n\tTwitter Username: <input type="text" name="uname" />\n\t               <input type="submit" name="submit" value="Submit" />\n\t</form>\n\t<hr />\n  <h1>')
        # SOURCE LINE 11
        __M_writer(escape(c.user))
        __M_writer(u' likes these:</h1>\n  <table>\n')
        # SOURCE LINE 13
        for item in c.favs:
            # SOURCE LINE 14
            __M_writer(u'    <tr><td><a href="http://twitter.com/')
            __M_writer(escape(item.author))
            __M_writer(u'">')
            __M_writer(escape(item.author))
            __M_writer(u'<a></td><td>')
            context.write(item.tweet) 
            
            __M_writer(u'\n    <a href="')
            # SOURCE LINE 15
            __M_writer(escape(item.link))
            __M_writer(u'">..</a></td></tr>\n')
        # SOURCE LINE 17
        __M_writer(u'  </table>\n</body>\n</html>')
        return ''
    finally:
        context.caller_stack._pop_frame()
开发者ID:shiva,项目名称:tfav,代码行数:30,代码来源:main.mako.py


示例14: render_body

def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        c = context.get('c', UNDEFINED)
        session = context.get('session', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\n\n')
        # SOURCE LINE 5
        __M_writer(u'\n\n<div id="darkener"></div>\n<div id="margins">\n\n<p id="userinfo">User: <span id="username">')
        # SOURCE LINE 10
        __M_writer(escape(session["user"]))
        __M_writer(u'</span>. <a href="/logout">Log out</a>.</p>\n\n<h1>')
        # SOURCE LINE 12
        __M_writer(escape(c.pagetitle))
        __M_writer(u'</h1>\n\n<div id="divFilterOptions">\n  <ul id="ulCols"></ul>\n\n  Search\n  <select id="selFilterBy"></select>\n  on\n  <select id="selSheet">\n    <option value="L" selected="selected">live</option>\n    <option value="H">history</option>\n    <option value="B">both</option>\n  </select>\n  sheet for\n  <input id="listfilter" type="text" value="" />\n  <input id="btnSearch" type="button" value="Search" />\n  &nbsp;&nbsp;<input id="btnClear" type="button" value="Clear" />\n</div>\n\n<div id="divTableControls">\n  <div id="divCols">Visible columns</div>\n  <select id="selItemsPerPage" name="selItemsPerPage">\n    <option value="10">10</option>\n    <option value="15">15</option>\n    <option value="25" selected="selected">25</option>\n    <option value="50">50</option>\n    <option value="75">75</option>\n    <option value="100">100</option>\n    <option value="150">150</option>\n    <option value="200">200</option>\n    <option value="0">(all)</option>\n  </select>\n  <label for="selItemsPerPage">items/page.</label>\n  <label for="selPageList">Page:</label>\n  <input id="btnPrevPage" type="button" value="&lt; prev" disabled="disabled" />\n  <select id="selPageList" name="selPageList">\n  </select>\n  <input id="btnNextPage" type="button" value="next &gt;" />\n\n  &nbsp;(')
        # SOURCE LINE 51
        __M_writer(escape(c.itemcount))
        __M_writer(u' items total, <span id="visiblecount"></span>&nbsp;of <span id="filteredcount">')
        __M_writer(escape(c.itemcount))
        __M_writer(u'</span> shown)\n</div>\n<table>\n  <thead class="colhead">\n    <tr id="columnheaders">\n    </tr>\n  </thead>\n  <tbody id="indextable">\n  </tbody>\n</table>\n<div id="loadingmessage">Loading item data...</div>\n\n<p id="otheractions">\n  <a id="lnkAddNewItem">Add new item...</a> |\n  <img src="/link_icon_grey.gif" width="12" height="11" />\n  <a href="" id="lnkHere" target="_blank"\n    title="Right-click and choose Copy Shortcut">Link to this view</a> |\n  <a href="/exportcsv" id="lnkExport">Download as spreadsheet</a> |\n  <img src="/link_icon_grey.gif" width="12" height="11" />\n  <a href="/tableprint" id="tableprint" target="_blank"\n    title="Link opens in a new window">Printable version</a>\n</p>\n\n<div id="itemeditor">\n<h2 id="itemloadingmessage"><img src="/ajax-loader_pale-blue.gif" width="16"\n    height="16" style="vertical-align: middle"> Checking item details...</h2>\n<h2 id="editorheading">Details for item # <span id="rep">1234</span> (added by \n    <span id="initials"></span>&nbsp;on <span id="datein"></span>):</h2>\n<h2 id="newitemheading">Enter details for new item:</h2>\n\n<div id="itemdetails_leftcol">\n  <div class="detailsection" id="section1">\n   <div class="propbox">\n      <label class="text" for="rep">REP number:</label>\n      <input type="text" name="rep" />\n    </div>\n\n    <div class="propbox" id="repinuse">\n      REP number is already in use\n    </div>\n    <div class="propbox" id="repok">\n      REP number OK\n    </div>\n    <div class="propbox" id="pendingrep">\n      Enter a REP number\n    </div>\n\n    <div class="propbox">\n      <label class="text" for="kind" id="lblKind">DOA/DOB:</label>\n      <select name="kind">\n        <option value="DOA">DOA</option>\n        <option value="DOB">DOB</option>\n      </select>\n    </div>\n\n    <div class="propbox" id="divCustomer">\n      <label class="text" for="customer" id="lblCustomer">Customer:</label>\n      <select name="customer">\n      </select>\n    </div>\n\n    <div class="propbox" id="divFujitsuOwned">\n      <label for="fujitsuowned" id="lblFujitsuOwned">\n        <input name="fujitsuowned" type="checkbox" id="chkFujitsuOwned" />\n        Fujitsu owned</label>\n    </div>\n\n    <div class="propbox">\n      <label class="text" for="value">Value:</label>\n      <input type="text" name="value" value="0.00" />\n    </div>\n    <div class="propbox">\n      <label class="text" for="costcentre">Cost centre:</label>\n      <input type="text" name="costcentre" value="" />\n    </div>\n\n    <div class="propbox">\n      <label class="text" for="ordernum">Order #:</label>\n      <input type="text" name="ordernum" value="" />\n    </div>\n  </div>\n\n\n  <div class="detailsection">\n    <div class="propbox">\n      <label class="text" for="make">Make:</label>\n      <input type="text" name="make" value="" />\n    </div>\n    <div class="propbox">\n      <label class="text" for="model">Model:</label>\n      <input type="text" name="model" value="" />\n    </div>\n    <div class="propbox">\n      <label class="text" for="part"><span class="rts_mandatory">*</span> Part #:</label>\n      <input type="text" name="part" value="" />\n    </div>\n    <div class="propbox">\n      <label class="text" for="serial"><span class="rts_mandatory">*</span> Serial #:</label>\n      <input type="text" name="serial" value="" />\n    </div>\n    <div class="propbox">\n      <label class="text" for="asset">Asset #:</label>\n      <input type="text" name="asset" value="" />\n    </div>\n    <div class="propbox">\n      <label class="text" for="warranty">Warranty:</label>\n      <input type="text" name="warranty" value="" />\n    </div>\n  </div>\n\n  <div class="detailsection">\n    <div class="propbox">\n      <label class="text" for="location">Location:</label>\n      <input type="text" name="location" value="" />\n    </div>\n\n    <div id="sapgrn" class="propbox">\n      <label class="text" for="sap"><span class="rts_mandatory">*</span> SAP/GRN:</label>\n      <input id="tbx_sap" class="sapgrn" type="text" name="sap" value="" /><input id="tbx_grn" class="sapgrn" type="text" name="grn" value="" />\n    </div>\n\n    <div class="propbox">\n      <label class="text" for="folio">Folio:</label>\n      <input type="text" name="folio" value="" />\n    </div>\n    <div class="propbox">\n      <label class="text" for="rtsdate">RTS Date:</label>\n      <input type="text" name="rtsdate" value="" />\n    </div>\n  </div>\n</div>\n\n\n<div id="itemdetails_rightcol">\n  <div id="textareas">\n    <div class="detailsection">\n      <label for="issue">Issue:</label>\n      <textarea class="longinput" name="issue"></textarea>\n    </div>\n\n    <div class="detailsection" id="sec_state">\n      <label for="state">Current state:</label>\n      <textarea class="longinput" name="state"></textarea>\n    </div>\n\n    <div class="detailsection">\n      <label for="solution">Solution:</label>\n      <textarea class="longinput" name="solution"></textarea>\n    </div>\n\n    <div class="detailsection">\n      <label for="comment">Comment:</label>\n      <textarea class="longinput" name="comment"></textarea>\n    </div>\n  </div>\n</div>\n\n<div id="editorcontrols">\n    <div id="editorbuttons">\n      <input type="button" id="deleteitem" value="Delete Item" disabled="true"/>\n      <input type="button" id="applyedit" value="Apply" />\n      <input type="button" id="okedit" value="OK" />\n      <input type="button" id="canceledit" value="Cancel" />\n    </div>\n\n    <div id="otheroptions">\n      <span class="rts_mandatory">*</span> required fields for <a href="" target="_blank" id="lnkPrint">printing RTS forms</a>.\n    </div>\n</div>\n\n<div id="debug1">&nbsp;</div>\n<div id="debug2">&nbsp;</div>\n\n\n</div>\n\n<!--\n<p id="logheader">JavaScript event log (<a href="#" id="hidelog">hide</a>):</p>\n-->\n<div id="log"></div>\n\n<p id="authorinfo">dobtrack by <a href="mailto:[email protected]">\nAndy Farrell</a></p>\n\n</div>\n\n<script type="text/javascript" src="/jquery.js"></script>\n<script type="text/javascript" src="/common.js"></script>\n<script type="text/javascript" src="/index.js"></script>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
开发者ID:caerphoto,项目名称:dobtrack,代码行数:25,代码来源:index.mako.py


示例15: render_body

def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        url = context.get('url', UNDEFINED)
        h = context.get('h', UNDEFINED)
        self = context.get('self', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 2
        __M_writer(u'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\r\n"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r\n<html>\r\n\t<head>\r\n\t\t<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\r\n\t\t<link rel="shortcut icon" href="/favicon.ico">\r\n\t\t')
        # SOURCE LINE 8
        __M_writer(escape(h.javascript_link(url('/_static/js/base.js'))))
        __M_writer(u'\r\n\t\t')
        # SOURCE LINE 9
        __M_writer(escape(h.stylesheet_link(url('/_static/css/base.css'))))
        __M_writer(u'\r\n\t\t\r\n\t\t')
        # SOURCE LINE 11
        __M_writer(escape(self.head_tags()))
        __M_writer(u'\r\n\t</head>\r\n\t<body>\r\n\t\t')
        # SOURCE LINE 14
        __M_writer(escape(self.body()))
        __M_writer(u'\r\n\t</body>\r\n</html>')
        return ''
    finally:
        context.caller_stack._pop_frame()
开发者ID:mobvox,项目名称:MVX-LAN-Manager,代码行数:25,代码来源:base.mako.py


示例16: render_body

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python html.literal函数代码示例发布时间:2022-05-26
下一篇:
Python helpers.Error类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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