Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move jinja2 templates to .html.jinja2 extensions #104

Closed
jace opened this issue Nov 21, 2015 · 1 comment
Closed

Move jinja2 templates to .html.jinja2 extensions #104

jace opened this issue Nov 21, 2015 · 1 comment

Comments

@jace
Copy link
Member

jace commented Nov 21, 2015

Following from #103, we need to rename all templates to .html.jinja2 extensions.

However, several templates including baseframe.html, layout.html, baseframe/forms.html and others are referred to from client apps, so renaming them will break clients. We have three options:

  1. Don't rename them.
  2. Rename but place symlinks at the old names (will possibly break on Windows-based dev environments, apart from creating chaos on Dropbox and other cloud-synced developer filesystem environments).
  3. Create shadow templates at the old names that simply consist of {% extends "<template>.html.jinja2" -%}. This will work for layout templates but not macro templates.

Approach 2 seems the best at this time.

@jace
Copy link
Member Author

jace commented Sep 26, 2017

Approach 3 may be more sensible. Layout templates can use the {% extends %} directive, while macro templates can use {% from "<template>.html.jinja2" import * %} (or explicit names if * is unsupported).

A deprecation alert comment should be included at the top:

{# DEPRECATED: This template is due to be be removed. Use the referenced template directly. #}

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

No branches or pull requests

1 participant