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

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

src/b/n/bnw-HEAD/bnw/web/site.py   bnw(Download)
            tag = tornado.escape.url_unescape(tag)
            qdict['tags'] = tag
        messages = list((yield objs.Message.find_sort(qdict, sort=f, limit=20, skip=20 * page)))
        hasmes = yield is_hasmes(qdict, page)
 
            tag = tornado.escape.url_unescape(tag)
            qdict['tags'] = tag
        messages = list((yield objs.Message.find_sort(qdict, sort=f, limit=20, skip=20 * page)))
        hasmes = yield is_hasmes(qdict, page)
 
                qdict['user'] = {'$nin': bl}
 
        messages = list((yield objs.Message.find_sort(qdict, sort=f, limit=20, skip=20 * page)))
        hasmes = yield is_hasmes(qdict, page)
        uc = (yield objs.User.count())
        self.write('<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n\n')
        while True:
            messages = list((yield objs.Message.find_sort({}, sort=f, fields={'id':1}, limit=20, skip=skip)))
            for message in messages:
                self.write('<url><loc>http://%s/p/%s</loc><priority>1.0</priority></url>\n' % (bnw.core.base.config.webui_base, message['id']))

src/b/n/bnw-HEAD/bnw/handlers/command_show.py   bnw(Download)
def showSearch(parameters, page, request):
    # FIXME: THIS COMMAND IS FUCKING SLOW SLOW SLOW AND WAS WRITTEN BY A
    # BRAIN-DAMAGED IDIOT
    messages = [x.filter_fields() for x in (yield objs.Message.find_sort(
        parameters, [('date', pymongo.DESCENDING)], limit=20, skip=page * 20))]
    feed = yield objs.FeedElement.find_sort({'user': request.user['name']},
                                            [('_id', pymongo.DESCENDING)], limit=20, skip=page * 20)
    messages = [x.filter_fields() for x in (yield objs.Message.find_sort({'id': {'$in':
                                                                                 [f['message']
                                                                                     for f in feed]
def cmd_today2(request):
    """ Показать обсуждаемое за последние 24 часа """
    start = time.time() - 86400
    messages = [x.filter_fields() for x in (yield objs.Message.find_sort({'date': {'$gte': start}}, [('replycount', pymongo.DESCENDING)], limit=20))]
    messages.reverse()

src/b/n/bnw-HEAD/bnw/handlers/command_delete.py   bnw(Download)
    if last:
        lastcomment = list((yield objs.Comment.find_sort({'user': request.user['name']}, [('date', -1)], limit=1)))
        lastmessage = list((yield objs.Message.find_sort({'user': request.user['name']}, [('date', -1)], limit=1)))
        if lastcomment:
            if lastmessage: