Code Room
Code reviewHard
Question
Review this Python (Jinja2) profile renderer used in a server-rendered app.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
from markupsafe import Markup def render_bio(user): # bio is user-supplied markdown converted to HTML elsewhere html = markdown_to_html(user.bio_md) return Markup( '<div class="bio">' + html + '</div>' ) # template: {{ render_bio(current_user_viewing) | safe }}Run or narrate your approach, then ask the coach.