Ejemplo n.º 1
0
def initializeNode():
    """
    This function is called only one time in a node life, and initialize
    the table. the configure_node run edit of this row (id = 1)
    This is not a @transact but is a white fly for this reason.
    """
    store = config.main.zstorm.get('main_store')

    onlyNode = Node()

    onlyNode.name = u"Please, set me: name/title"
    onlyNode.description = u"Please, set me: description"
    onlyNode.hidden_service = u"Please, set me: hidden service"
    onlyNode.public_site = u"Please, set me: public site"
    onlyNode.email = u"*****@*****.**"
    onlyNode.stats_update_time = 2 # hours
    onlyNode.languages = [ { "code" : "it" , "name": "Italiano"}, { "code" : "en" , "name" : "English" }]

    store.add(onlyNode)