Example #1
0
def to_amf_Stack(obj):
    """
    """
    return to_amf(dict(
        id=obj.file.id,
        filename=obj.file.filename,
    ))
Example #2
0
def to_amf_Term(obj):
    """
    """
    return to_amf(typedobject("org.roteroktober.zkmax.model.Tag", dict(    
        id=obj.id,
        name=obj.name,
        weight=obj.weight,
        gotchis=[o.user.id for o in obj.nodes],
    )))
Example #3
0
def to_amf_User(obj):
    """
    """
    return to_amf(typedobject("org.roteroktober.zkmax.model.Person",dict(
        id=obj.id,
        name=obj.name,
        signature=obj.signature,
        img=obj.picture,
    )))
Example #4
0
def to_amf_Comment(obj):
    """
    """
    return to_amf(typedobject("org.roteroktober.zkmax.model.Comment",dict(
        id=obj.id,
        filename = obj.filename,
        comment = obj.comment,
        timestamp = obj.timestamp,
        node = obj.node,
    )))
Example #5
0
def to_amf_Node(obj):
    """
    """
    nr = NodeRevision.get(obj.id)
    
    stack = makeStack(nr)    
    
    return to_amf(typedobject("org.roteroktober.zkmax.model.Entry", dict(
        id=obj.id,
        name=obj.title,
        teaser=nr.teaser,
        body=nr.body,
        author=obj.user,
        files=[file.filepath for file in stack],
    )))