Skip to content

Fix template inheritance: move layout.html to layouts/ and wire /users route#11

Merged
mokevnin merged 1 commit into
templates-inheritancefrom
fix-template-inheritance-path
May 13, 2026
Merged

Fix template inheritance: move layout.html to layouts/ and wire /users route#11
mokevnin merged 1 commit into
templates-inheritancefrom
fix-template-inheritance-path

Conversation

@mokevnin
Copy link
Copy Markdown
Contributor

Summary

  • Move templates/users/layout.htmltemplates/layouts/layout.html — Jinja2 resolves paths from the templates root, so placing layout.html inside users/ made {% extends "layout.html" %} raise TemplateNotFound
  • Fix {% extends "layout.html" %}{% extends "layouts/layout.html" %} in users/index.html
  • Add {% extends "layouts/layout.html" %} + {% block content %} to users/show.html
  • Render users/index.html in GET /users route (was returning a plain string, hiding the broken extends)

🤖 Generated with Claude Code

…s route

- Move templates/users/layout.html → templates/layouts/layout.html
- Fix {% extends "layout.html" %} → {% extends "layouts/layout.html" %} in users/index.html
- Add extends + block content to users/show.html
- Render users/index.html in GET /users route (was returning a plain string)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mokevnin mokevnin merged commit ef39d96 into templates-inheritance May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant