def texting(): if request.method == "GET": return messages.get() elif request.method=="POST": return messages.post() else : Response("not supported", mimetype="text/html", status=500)
def post_repost(self, *args, **kwargs): object_id = "wall{0}_{1}".format(self.post[self.user_identifier], self.post[self.post_identifier]) p = messages.post(session=self.session, title=_(u"Repost"), caption=_(u"Add your comment here"), text="") if p.message.get_response() == widgetUtils.OK: msg = p.message.get_text().encode("utf-8") self.session.vk.client.wall.repost(object=object_id, message=msg)
def post(self, *args, **kwargs): p = messages.post(session=self.session, title=_(u"Write your post"), caption="", text="") if p.message.get_response() == widgetUtils.OK: call_threaded(self.do_last, p=p)