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

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

src/b/n/bnw-HEAD/bnw/handlers/command_show.py   bnw(Download)
def showComments(msgid, request, bl=None, after=''):
    message = yield objs.Message.find_one({'id': msgid})
    if message is None:
            ok=False, desc='No such message', cache=5, cache_public=True))
        if before:
            befmsg = yield objs.Message.find_one({'id': before})
            if befmsg:
                parameters['date'] = {'$lt': befmsg['date']}
                defer.returnValue(dict(ok=False, desc="Message to search before doesn't exist."))
        if after:
            afmsg = yield objs.Message.find_one({'id': after})

src/b/n/bnw-HEAD/bnw/handlers/command_delete.py   bnw(Download)
    if comment_id:
        comment = yield objs.Comment.find_one({'id': comment_id, 'message': message_id})
    post = yield objs.Message.find_one({'id': message_id})
    if comment_id:
        if not comment:

src/b/n/bnw-HEAD/bnw/handlers/command_update.py   bnw(Download)
    post = yield objs.Message.find_one({'id': message})
    if not post:

src/b/n/bnw-HEAD/bnw/handlers/command_post.py   bnw(Download)
def cmd_recommend(request, message="", comment="", unrecommend=""):
        """Recommend or unrecommend message."""
        message_id = canonic_message(message).upper()
        message_obj = yield objs.Message.find_one({'id': message_id})
        if not message_obj:

src/b/n/bnw-HEAD/bnw/web/site.py   bnw(Download)
    def respond(self, msgid):
        user = yield self.get_auth_user()
        f = [("date", 1)]
        msg = (yield objs.Message.find_one({'id': msgid}))
        qdict = {'message': msgid}