def _store(self, uid, content, data=None):
        """Store the given dict of content at uid. Nothing returned."""
        doc = dict(uid=uid)
        if data:
            gfs = gridfs.GridFS(self.db)
            id = gfs.put(data, encoding='utf-8')
            doc.update(data_id=id)
        doc.update(content)
        self.db.pastes.insert_one(doc)
def _store ( self , uid , content , data = None ) : doc = dict ( uid = uid ) if data : gfs = gridfs . GridFS ( self . db ) id = gfs . put ( data , encoding = 'utf-8' ) doc . update ( data_id = id ) doc . update ( content ) self . db . pastes . insert_one ( doc )
Store the given dict of content at uid. Nothing returned.