Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(7)  |  Derive(0)  |  Import(2)

src/b/n/bnw-HEAD/bnw/handlers/command_post.py   bnw(Download)
from bnw.core.base import BnwResponse, get_webui_base
import bnw.core.bnw_objects as objs
from bnw.core.post import publish
 
from twisted.python import log
                all_recos = list(message_obj['recommendations'])
                all_recos.remove(request.user['name'])
                publish('upd_recommendations_count',
                        message_id, rcount, all_recos)
                publish('upd_recommendations_count_in_' + message_id,

src/b/n/bnw-HEAD/bnw/handlers/command_delete.py   bnw(Download)
from base import *
import bnw.core.bnw_objects as objs
from bnw.core.post import publish
from twisted.internet import defer
 
        _ = (yield objs.Message.mupdate({'id': message_id}, {'$inc': {'replycount': -1}}))
        _ = yield objs.Comment.remove({'id': comment['id'], 'message': comment['message'], 'user': comment['user']})
        publish('del_comment_in_' + message_id, comment_id)
        publish('upd_comments_count', message_id, post['replycount'] - 1)
        publish('upd_comments_count_in_' + message_id,
        _ = yield objs.Message.remove({'id': post['id'], 'user': post['user']})
        _ = yield objs.Comment.remove({'message': post['id']})
        publish('del_message', message_id)
        publish('del_message_on_user_' + post['user'], message_id)
        defer.returnValue(