Skip to content

Port HTML templates to Jinja2#60

Merged
DavidBuchanan314 merged 2 commits intomainfrom
html-templating
Oct 5, 2025
Merged

Port HTML templates to Jinja2#60
DavidBuchanan314 merged 2 commits intomainfrom
html-templating

Conversation

@DavidBuchanan314
Copy link
Copy Markdown
Owner

  • Add jinja2 dependency for secure HTML templating
  • Move templates from inline strings to separate HTML files
  • Use FileSystemLoader to load templates at startup (auto_reload=False)
  • Enable auto-escaping for XSS protection
  • Implement template inheritance with base.html

- Add jinja2 dependency for secure HTML templating
- Move templates from inline strings to separate HTML files
- Use FileSystemLoader to load templates at startup (auto_reload=False)
- Enable auto-escaping for XSS protection
- Implement template inheritance with base.html
- Remove html_templates.py wrapper module
- Set up Jinja2 environment in construct_app() in service.py
- Add MILLIPDS_JINJA_ENV AppKey and get_jinja_env() helper
- Update auth_oauth.py to render templates directly at point of use
- Fix deprecation warning: raise HTTPNotFound instead of returning it
@DavidBuchanan314 DavidBuchanan314 merged commit f5649d9 into main Oct 5, 2025
4 checks passed
@DavidBuchanan314
Copy link
Copy Markdown
Owner Author

thought about adding bytecode caching but almost certainly not worth it for this use case

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