Ejemplo n.º 1
0
  def get(self, action, messageid):
	message = models.update_message_status(action, messageid)
	if action == "approve": 
		actiontext = "approved"
	else:
		actiontext = "blocked"
	template_values = {
		'message' : message,
		'actiontext' : actiontext,
	}
	helpers.render_admin_template(self, "adminviews/messageaction.html", template_values)
Ejemplo n.º 2
0
  def post(self):
	messageids = self.request.get("messageset").split(",")
	for messageid in messageids:
		models.update_message_status("approve", messageid)
	self.redirect("/admin/")