-
Notifications
You must be signed in to change notification settings - Fork 42
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
migrate all templates to jinja2 #170
Comments
Just a follow-up: I'm half way done migrating templates to Jinja2: https://github.com/chaws/squad/tree/migrate-templates-to-jinja2 One big issue I stumbled across was Django Rest Framework's (DRF) support do Jinja2: it doesn't[1] have much. This means that the whole /api part of the frontend will need to be handled with Django's default template engine (DTL), while the rest is being migrated to Jinja2. I managed to work around that by tweaking folders/settings a bit. Now most of migrated templates will be in I want to be done with this next week. |
IIUC the only difference here is:
vs
Maybe it would be possible to create a block here and fill in this block differently for different engines? I guess block handling is identical for django and jinja templates. I didn't try it, so take the advice with a pinch of salt. |
I thought about that too, but it would require checking all Django Rest Framework's templates (~70 files) and making blocks for their templates do work too. My idea here is to have 'https://qa-reports.linaro.org/api/*' using Django's template language (only because Django Rest Framework), and the rest using Jinja2. What do you think? |
Just opened a PR #377 |
Imported from https://projects.linaro.org/browse/QA-1739
The text was updated successfully, but these errors were encountered: