Skip to content

Commit 427cfdc

Browse files
alanbchristieAlan Christie
and
Alan Christie
authored
style: Add note and display template and its context (#637)
Co-authored-by: Alan Christie <alan.christie@matildapeak.com>
1 parent 76481ad commit 427cfdc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

viewer/views.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ def react(request):
9797
via the 'context' variable used for the view's template.
9898
"""
9999

100+
# ----
101+
# NOTE: If you add or remove any context keys here
102+
# ---- you MUST update the template that gets rendered
103+
# (viewer/react_temp.html) so that is matches
104+
# the keys you are creating and passing here.
105+
100106
# Start building the context that will be passed to the template
101107
context = {'legacy_url': settings.LEGACY_URL}
102108

@@ -133,7 +139,9 @@ def react(request):
133139

134140
context['target_warning_message'] = settings.TARGET_WARNING_MESSAGE
135141

136-
return render(request, "viewer/react_temp.html", context)
142+
render_template = "viewer/react_temp.html"
143+
logger.info("Rendering %s with context=%s...", render_template, context)
144+
return render(request, render_template, context)
137145

138146

139147
# --------------------

0 commit comments

Comments
 (0)