コード例 #1
0
def export_block(block, xmlfile, zipfile):
    object = block.content_object
    try:
        type, export_fn = get_exporter(object.__class__, export_type='statichtml')
    except KeyError:
        return {}
    return export_fn(object, xmlfile, zipfile)
コード例 #2
0
def export_block(block, xmlfile, zipfile):
    object = block.content_object
    type, export_fn = get_exporter(object.__class__)
    print >> xmlfile, u"""<pageblock id="%s" type="%s" label="%s" ordinality="%s">""" % (
        block.pk,
        type,
        sanitize(block.label),
        block.ordinality,
    )
    export_fn(object, xmlfile, zipfile)
    print >> xmlfile, "</pageblock>"