示例#1
0
文件: Orbit.py 项目: haxel/spaceplace
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],
    )))
示例#2
0
文件: Orbit.py 项目: haxel/spaceplace
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,
    )))
示例#3
0
文件: Orbit.py 项目: haxel/spaceplace
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,
    )))
示例#4
0
文件: Orbit.py 项目: haxel/spaceplace
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],
    )))