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
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
def __init__(self, id=None, **values): Document.__init__(self, id, **values) self.class_db = get_couch_db(type(self).__name__)
def __init__(self, *args, **kwargs): Document.__init__(self, *args, **kwargs) if not getattr(self, 'id', None): self.id = uuid4().hex
def __init__(self, db=None): if db: self.db = db Document.__init__(self)
def __init__(self,space=False): Document.__init__(self) self.space = space