Beispiel #1
0
	def rename(self):
		doc_id = self.request.get('doc_id', None)
		new_name = self.request.get('new_name', None)
		if new_name:
			doc = Document.get(doc_id)
			doc.Name = new_name
			doc.put()
		self._renderList()
Beispiel #2
0
	def get(self, doc_id):
		doc = Document.get(doc_id)
		if doc:
			self.response.headers['Content-Type'] = str(doc.Mime)
			self.response.out.write(doc.Contents)
			return
		else:
			print "failed."