MCPcopy Create free account
hub / github.com/internetarchive/openlibrary / GET

Method GET

openlibrary/plugins/admin/code.py:207–219  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

205
206class _reload(delegate.page):
207 def GET(self):
208 # make sure the request is coming from the LAN.
209 if web.ctx.ip not in ["127.0.0.1", "0.0.0.0"] and web.ctx.ip.rsplit(".", 1)[0] != local_ip().rsplit(".", 1)[0]:
210 return render.permission_denied(web.ctx.fullpath, "Permission denied to reload templates/macros.")
211
212 from infogami.plugins.wikitemplates import code as wikitemplates
213
214 wikitemplates.load_all()
215
216 from openlibrary.plugins.upstream import code as upstream
217
218 upstream.reload()
219 return delegate.RawText("done")
220
221
222class any:

Callers

nothing calls this directly

Calls 2

local_ipFunction · 0.85
reloadMethod · 0.45

Tested by

no test coverage detected