We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7753d92 commit 459b33aCopy full SHA for 459b33a
1 file changed
openlibrary/plugins/openlibrary/home.py
@@ -112,11 +112,15 @@ class home(delegate.page):
112
path = "/"
113
114
def GET(self):
115
- cached_homepage = get_cached_homepage()
+ if devmode := "dev" in web.ctx.features:
116
+ homepage_data = get_homepage(devmode)
117
+ else:
118
+ homepage_data = get_cached_homepage()
119
+
120
# when homepage is cached, home/index.html template
121
# doesn't run ctx.setdefault to set the cssfile so we must do so here:
122
web.template.Template.globals['ctx']['cssfile'] = 'home'
- return web.template.TemplateResult(cached_homepage)
123
+ return web.template.TemplateResult(homepage_data)
124
125
126
@cache.memoize(
0 commit comments