def doc_constructor(request, **kwargs):
    doc = HTML5.new_document()
    doc.stylesheets = ["common.css", "ui.css", "db.css"]
    doc.scripts = ["MochiKit.js", "proxy.js", "ui.js", "sorttable.js", "db.js"]
    for name, val in kwargs.items():
        setattr(doc, name, val)
    nav = doc.add_section("navigation")
    NM = doc.nodemaker
    NBSP = NM("_", None)
    nav.append(NM("P", None,
         NM("A", {"href":"/"}, "Home"), NBSP,
         NM("A", {"href": request.get_url(listall)}, "Top"), NBSP,
         NM("A", {"href":".."}, "Up") if request.path.count("/") > 2 else NBSP, NBSP,
    ))
    nav.append(NM("P", {"class_": "title"}, "Storage Editor"))
    nav.append(NM("P", None,
            NM("A", {"href": "/auth/logout"}, "logout")))
    doc.add_section("messages", id="messages")
    return doc
dataset/ETHPy150Open kdart/pycopia/storage/pycopia/db/webservice.py/doc_constructor/original