示例#1
0
 def __init__(self, id=None, document_type=None, **values):
     if id is None:
         id = uuid1().hex
     Document.__init__(self, id=id, **values)
     self.created = utcnow()
     self.document_type = document_type
     self.void = False
示例#2
0
文件: zhanghao.py 项目: secjex/mmo
 def __init__(self, name, level, seller, price, tags):
     Document.__init__(self)
     self.name = name
     self.level = level
     self.seller = seller
     self.gmt_create = str(datetime.now())
     self.price = price
     self.tags = tags
示例#3
0
 def __init__(self, id=None, **values):
     Document.__init__(self, id, **values)
     self.class_db = get_couch_db(type(self).__name__)
示例#4
0
 def __init__(self, *args, **kwargs):
     Document.__init__(self, *args, **kwargs)
     if not getattr(self, 'id', None):
         self.id = uuid4().hex
示例#5
0
    def __init__(self, db=None):
        if db:
            self.db = db

        Document.__init__(self)
示例#6
0
文件: node.py 项目: thouters/ltr
 def __init__(self,space=False):
     Document.__init__(self)
     self.space = space