Exemple #1
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],
    )))
Exemple #2
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,
    )))
Exemple #3
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,
    )))
Exemple #4
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],
    )))