Beispiel #1
0
def doc_class(request, ns, cls):
    try:
        doc = create_documentation(WUI_JS_DIR + '/wui.js')
        ns = doc['ns'][ns]
        clazz = ns['classes'][cls]
        
        include = 'api_%s-%s.html' % (ns['namespace'].lower().strip(), clazz['class'].lower().strip())
        if not os.path.exists(os.path.join(TEMPLATE_DIRS, include)):
            include = None

        return render_to_response('api_doc_class.html', locals(), context_instance=RequestContext(request))
    except Exception:
        raise Http404()
Beispiel #2
0
def doc_namespace(request, ns):
    doc = create_documentation(WUI_JS_DIR + '/wui.js')
    ns = doc['ns'][ns]
    return render_to_response('api_doc_namespace.html', locals(), context_instance=RequestContext(request))
Beispiel #3
0
def index(request):
    doc = create_documentation(WUI_JS_DIR + '/wui.js')
    return render_to_response('api_index.html', locals(), context_instance=RequestContext(request))