Пример #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
 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
 def __init__(self,space=False):
     Document.__init__(self)
     self.space = space