Example #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)
Example #2
0
 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))
Example #3
0
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)
Example #4
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)
Example #5
0
 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))
Example #6
0
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)
Example #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)
Example #8
0
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)
Example #9
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)
Example #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)
Example #11
0
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)
Example #12
0
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)
Example #13
0
 def GET(self):
     params = entryService.search(entryService.types.index,
                                  config.subscribe_url)
     web.header('Content-Type', 'text/xml')
     return render.atom(params)
Example #14
0
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)
Example #15
0
 def GET(self):
     params =  entryService.search(entryService.types.index, config.subscribe_url)
     web.header('Content-Type', 'text/xml')
     return render.atom(params)
Example #16
0
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)
Example #17
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)
Example #18
0
def Subscribe():
    params = entryService.search(entryService.types.index,
                                 config.subscribe_url)
    response.headers['Content-Type'] = 'text/xml'
    return template('atom', params=params, config=config)
Example #19
0
def Subscribe():
    params =  entryService.search(entryService.types.index, config.subscribe_url)
    response.headers['Content-Type'] = 'text/xml'
    return template('atom', params=params, config=config)
Example #20
0
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)