MCPcopy Index your code
hub / github.com/webpy/webpy / url

Function url

web/http.py:132–147  ·  view source on GitHub ↗

Makes url by concatenating web.ctx.homepath and path and the query string created using the arguments.

(path=None, doseq=False, **kw)

Source from the content-addressed store, hash-verified

130
131
132def url(path=None, doseq=False, **kw):
133 """
134 Makes url by concatenating web.ctx.homepath and path and the
135 query string created using the arguments.
136 """
137 if path is None:
138 path = web.ctx.path
139 if path.startswith("/"):
140 out = web.ctx.homepath + path
141 else:
142 out = path
143
144 if kw:
145 out += "?" + urlencode(kw, doseq=doseq)
146
147 return out
148
149
150def profiler(app):

Callers

nothing calls this directly

Calls 1

urlencodeFunction · 0.85

Tested by

no test coverage detected