Ejemplo n.º 1
0
def remark_moderate(request, plname):
    params = {
        "startkey": [plname],
        "endkey": [plname, {}]
    }
    path = make_path(PROXY_BASE_PATH, "_list/remarksqueue/remarks", **encode_params(params))
    return proxy(request, path, plname=plname, headers=default_headers(PROXY_BASE_PATH,
                                     settings.WEB_PROXY_INDEX))
Ejemplo n.º 2
0
def index(request):
    if request.method == "POST" or request.method == "PUT":
        return proxy(request, PROXY_BASE_PATH, headers=default_headers(PROXY_BASE_PATH, 
						settings.WEB_PROXY_INDEX))
	
    params = {
        "include_docs": True
    }
    path = make_path(PROXY_BASE_PATH, "_list/index/pls", **encode_params(params))
    return proxy(request, path, headers=default_headers(PROXY_BASE_PATH, 
                                                settings.WEB_PROXY_INDEX))
Ejemplo n.º 3
0
def remark_detail(request, plname, secnum, blocknum, remarknum):
    params = {
        "startkey": [plname,int(secnum), int(blocknum), int(remarknum)],
        "endkey": [plname,{},int(secnum), int(blocknum), int(remarknum)],
        "include_docs": True
    }
    headers = {"X-AIMPL-Path": PROXY_BASE_PATH}
    path = make_path(PROXY_BASE_PATH, "_list/block/pl", **encode_params(params))
    return proxy(request, path, plname=plname,
                headers=default_headers(PROXY_BASE_PATH, 
                                        settings.WEB_PROXY_INDEX))
Ejemplo n.º 4
0
def sec_detail(request, plname, version=None, secnum=None, blocknum=None):
    key=plname
    if version:
        key += "/v%s" % version
    params = {
        "startkey": [key,int(secnum)],
        "endkey": [key,int(secnum), {}],
        "include_docs": True
    }
    path = make_path(PROXY_BASE_PATH, "_list/section/pl_full", **encode_params(params))
    return proxy(request, path, plname=plname, 
                headers=default_headers(PROXY_BASE_PATH,
                                settings.WEB_PROXY_INDEX))
Ejemplo n.º 5
0
def pl_detail(request, plname, version=None):
    key=plname
    if version:
        key += "/v%s" % version
    params = {
        "startkey": [key],
        "endkey": [key, {}],
        "include_docs": True
    }
    
    path = make_path(PROXY_BASE_PATH, "_list/pl/pl_with_sections", **encode_params(params))
    return proxy(request, path, plname=plname, 
                headers=default_headers(PROXY_BASE_PATH, 
                                settings.WEB_PROXY_INDEX))