def delete_post(post_id): try: posts.delete_post(post_id) except PostNotFound: return xmpp_template('post_not_found', post_id=post_id) except PostAuthorError: return xmpp_template('post_del_denied', post_id=post_id) return xmpp_template('post_del', post_id=post_id)
def delete_post(post_id): try: posts.delete_post(post_id) except PostNotFound: return xmpp_template('post_not_found', post_id=post_id) except PostAuthorError: return xmpp_template('post_del_denied', post_id=post_id) return xmpp_template('post_del', post_id=post_id)
def delete(id): comment_id = env.request.args('comment_id') try: if comment_id: post = posts.delete_comment(id, comment_id) if env.owner: login = post.author.login.lower() else: post = Post(id) login = post.author.login.lower() return Response(redirect='%s://%s.%s/%s' % \ (env.request.protocol, login, settings.domain, id)) else: posts.delete_post(id) return Response(redirect='%s://%s.%s/blog' % \ (env.request.protocol, env.user.login.lower(), settings.domain)) except PostAuthorError: raise SubscribeError
def delete(id): comment_id = env.request.args('comment_id') try: if comment_id: post = posts.delete_comment(id, comment_id) if env.owner: login = post.author.login.lower() else: post = Post(id) login = post.author.login.lower() return Response(redirect='%s://%s.%s/%s' % \ (env.request.protocol, login, settings.domain, id)) else: posts.delete_post(id) return Response(redirect='%s://%s.%s/blog' % \ (env.request.protocol, env.user.login.lower(), settings.domain)) except PostAuthorError: raise SubscribeError
def delete_post(id): try: posts.delete_post(id) except PostAuthorError: raise SubscribeError
def delete_post(id): try: posts.delete_post(id) except PostAuthorError: raise SubscribeError