コード例 #1
0
 def GET(self):
     params = web.input(start=config.start, limit=config.limit)
     limit = int(params.limit)
     start = int(params.start)
     params = entryService.search(entryService.types.index,
                                  config.index_url, '', start, limit)
     return render.index(params)
コード例 #2
0
ファイル: controller.py プロジェクト: bryant1410/blog-2
 def GET(self, url):
     params = web.input(type=entryService.types.query, value='', \
                        start=config.start, limit=config.limit)
     limit = int(params.limit)
     start = int(params.start)
     url = '%s/?type=%s&value=%s&start=%d&limit=%d' % (config.search_url, params.type, params.value, start, limit)
     params = entryService.search(params.type, url, params.value, start, limit)
     if not params.entries == None:
         return render.search(params)
     raise web.notfound(render.error(params))
コード例 #3
0
ファイル: routes.py プロジェクト: MaloneQQ/YouMd
def Entry(url):
    if not url in ['', '/']:
        url = config.entry_url + url
        params = entryService.find_by_url(entryService.types.entry, url)
        if params.entry == None:
            return template('error', params=params, config=config)
        else:
            return template('entry', params=params, config=config)
    params = entryService.search(entryService.types.index, url)
    return template('index', params=params, config=config)
コード例 #4
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
 def GET(self, url):
     if not url in ['', '/']:
         url = config.entry_url + url
         params = entryService.find_by_url(entryService.types.entry, url)
         if params.entry == None:
             raise web.notfound(render.error(params))
         else:
             return render.entry(params)
     params = entryService.search(entryService.types.index, url)
     return render.index(params)
コード例 #5
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
 def GET(self, url):
     params = web.input(type=entryService.types.query, value='',\
                        start=config.start, limit=config.limit)
     limit = int(params.limit)
     start = int(params.start)
     url = '%s/?type=%s&value=%s&start=%d&limit=%d' % (config.search_url, params.type, params.value, start, limit)
     params = entryService.search(params.type, url, params.value, start, limit)
     if not params.entries == None: 
         return render.search(params)
     raise web.notfound(render.error(params))
コード例 #6
0
ファイル: routes.py プロジェクト: toohamster/YouMd
def Entry(url):
    if not url in ['', '/']:
        url = config.entry_url + url
        params = entryService.find_by_url(entryService.types.entry, url)
        if params.entry == None:
            return template('error', params=params, config=config)
        else:
            return template('entry', params=params, config=config)
    params = entryService.search(entryService.types.index, url)
    return template('index', params=params, config=config)
コード例 #7
0
 def GET(self, url):
     if not url in ['', '/']:
         url = config.entry_url + url
         params = entryService.find_by_url(entryService.types.entry, url)
         if params.entry == None:
             raise web.notfound(render.error(params))
         else:
             return render.entry(params)
     params = entryService.search(entryService.types.index, url)
     return render.index(params)
コード例 #8
0
ファイル: routes.py プロジェクト: MaloneQQ/YouMd
def Search():
    type = request.GET.get('type', entryService.types.query)
    value = request.GET.get('value', '')
    limit = int(request.GET.get('limit', config.limit))
    start = int(request.GET.get('start', config.start))
    
    url = '%s/?type=%s&value=%s&start=%d&limit=%d' % (config.search_url, type, value, start, limit)
    params = entryService.search(type, url, value, start, limit)
    if not params.entries == None:
        return template('search', params=params, config=config)
    return template('error', params=params, config=config)
コード例 #9
0
ファイル: routes.py プロジェクト: zylianyao/YouMd
def Search(url):
    print url.split("/")
    type,value,startStr,limitStr = url.split("/")
    limit = int(limitStr)
    start = int(startStr)

    url = '%s/?type=%s&value=%s&start=%d&limit=%d' % (config.search_url, type, value, start, limit)
    params = entryService.search(type, url, value, start, limit)
    if not params.entries == None:
        return template('search', params=params, config=config)
    return template('error', params=params, config=config)
コード例 #10
0
def Search(url):
    print url.split("/")
    type, value, startStr, limitStr = url.split("/")
    limit = int(limitStr)
    start = int(startStr)

    url = '%s/?type=%s&value=%s&start=%d&limit=%d' % (config.search_url, type,
                                                      value, start, limit)
    params = entryService.search(type, url, value, start, limit)
    if not params.entries == None:
        return template('search', params=params, config=config)
    return template('error', params=params, config=config)
コード例 #11
0
ファイル: routes.py プロジェクト: tyjsee/YouMd
def Search():
    type = request.GET.get('type', entryService.types.query)
    value = request.GET.get('value', '')
    limit = int(request.GET.get('limit', config.limit))
    start = int(request.GET.get('start', config.start))

    url = '%s/?type=%s&value=%s&start=%d&limit=%d' % (config.search_url, type,
                                                      value, start, limit)
    params = entryService.search(type, url, value, start, limit)
    if not params.entries == None:
        return template('search', params=params, config=config)
    return template('error', params=params, config=config)
コード例 #12
0
ファイル: routes.py プロジェクト: tyjsee/YouMd
def sitemap():
    params = entryService.search(entryService.types.index,
                                 config.subscribe_url,
                                 limit=10000)
    response.headers['Content-Type'] = 'text/xml'
    return template('sitemap.html', params=params, config=config)
コード例 #13
0
 def GET(self):
     params = entryService.search(entryService.types.index,
                                  config.subscribe_url)
     web.header('Content-Type', 'text/xml')
     return render.atom(params)
コード例 #14
0
ファイル: routes.py プロジェクト: MaloneQQ/YouMd
def sitemap():
    params =  entryService.search(entryService.types.index, config.subscribe_url, limit=10000)
    response.headers['Content-Type'] = 'text/xml'
    return template('sitemap.html', params=params, config=config)
コード例 #15
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
 def GET(self):
     params =  entryService.search(entryService.types.index, config.subscribe_url)
     web.header('Content-Type', 'text/xml')
     return render.atom(params)
コード例 #16
0
ファイル: routes.py プロジェクト: MaloneQQ/YouMd
def Index():
    limit = int(request.GET.get('limit', 10))
    start = int(request.GET.get('start', 1))
    params = entryService.search(entryService.types.index, config.index_url, '', start, limit)
    return template('index', params=params, config=config)
コード例 #17
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
 def GET(self):
     params = web.input(start=config.start, limit=config.limit)
     limit = int(params.limit)
     start = int(params.start)
     params = entryService.search(entryService.types.index, config.index_url, '', start, limit)
     return render.index(params)
コード例 #18
0
ファイル: routes.py プロジェクト: tyjsee/YouMd
def Subscribe():
    params = entryService.search(entryService.types.index,
                                 config.subscribe_url)
    response.headers['Content-Type'] = 'text/xml'
    return template('atom', params=params, config=config)
コード例 #19
0
ファイル: routes.py プロジェクト: MaloneQQ/YouMd
def Subscribe():
    params =  entryService.search(entryService.types.index, config.subscribe_url)
    response.headers['Content-Type'] = 'text/xml'
    return template('atom', params=params, config=config)
コード例 #20
0
ファイル: routes.py プロジェクト: tyjsee/YouMd
def Index():
    limit = int(request.GET.get('limit', 10))
    start = int(request.GET.get('start', 1))
    params = entryService.search(entryService.types.index, config.index_url,
                                 '', start, limit)
    return template('index', params=params, config=config)