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

Do not expand all UI files as Jinja2 templates #132

Closed
mgeisler opened this issue Jun 17, 2014 · 0 comments
Closed

Do not expand all UI files as Jinja2 templates #132

mgeisler opened this issue Jun 17, 2014 · 0 comments

Comments

@mgeisler
Copy link
Contributor

When working with the video browser app, I ran into mgeisler/video-browser#6. That issue is blocked because zpm expands all UI files as Jinja2 templates.

I suggest that we only expand UI files ending in .tmpl or similar. We would then also rename the files after expanding them. So if zapp.yaml has

ui:
  - index.html.tmpl
  - somelib.js

then we would run index.html.tmpl through Jinja2 and store the result as index.html in the zapp. We would not modify somelib.js at all, just include it in the zapp.

mgeisler added a commit to mgeisler/zpm that referenced this issue Jun 20, 2014
When deploying a zapp, we now only treat UI file ending in .tmpl as
Jinja2 templates. Other files are uploaded verbatim.

Testing with more than one UI file showed that we implictly depended
on the order of iteration over the set returned by _find_ui_uploads.
Sets are unordered, so the tests would fail. We now return a list
instead to get deterministic output.
mgeisler added a commit to mgeisler/zpm that referenced this issue Jun 20, 2014
When deploying a zapp, we now only treat UI file ending in .tmpl as
Jinja2 templates. Other files are uploaded verbatim.

Testing with more than one UI file showed that we implictly depended
on the order of iteration over the set returned by _find_ui_uploads.
Sets are unordered, so the tests would fail. We now return a list
instead to get deterministic output.
pkit added a commit that referenced this issue Jun 20, 2014
Only process .tmpl files as Jinja2 templates (fixes #132)
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