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

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/b/n/bnw-HEAD/bnw/handlers/command_delete.py   bnw(Download)
                dict(ok=False, desc='Not your comment and not your message.')
        _ = (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)

src/b/n/bnw-HEAD/bnw/handlers/command_update.py   bnw(Download)
def update_internal(message, what, delete, text):
    action = '$pull' if delete else '$addToSet'
    defer.returnValue((yield objs.Message.mupdate({'id': message}, {action: {what: text}})))
                defer.returnValue(dict(ok=False, desc='Too many clubs.'))
            yield objs.Message.mupdate(
                {'id': message}, {'$set': {'clubs': clubs}})
        if tags is not None:
            tags = tags.split(',') if tags else []
                defer.returnValue(dict(ok=False, desc='Too many tags.'))
            yield objs.Message.mupdate(
                {'id': message}, {'$set': {'tags': tags}})
        defer.returnValue(dict(ok=True, desc='Message updated.'))

src/b/n/bnw-HEAD/bnw/handlers/command_post.py   bnw(Download)
            if request.user['name'] in message_obj['recommendations']:
                yield objs.Message.mupdate(
                    {'id': message_id},
                    {'$pull': {'recommendations': request.user['name']}})
                rcount = len(message_obj['recommendations']) - 1