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

frontend: migrate all templates to Jinja2 #377

Merged
merged 1 commit into from
Oct 22, 2018

Conversation

chaws
Copy link
Collaborator

@chaws chaws commented Oct 18, 2018

All templates (web, email, txt) were migrated to Jinja2, except those in
'squad/templates/django' due to lack of support of Django Rest Framework
along with Jinja. Bellow are a few items worth mentioning:

  • migrated all .html templates to .jinja2
    using Jinja2's syntax
  • kept templatetags, decorating them as global functions
    and filters, following Jinja2 guidelines
  • adjusted settings.py to work properly with Jinja2
  • created squad/jinja2.py, that loads default filters
    from Django and load squad's custom templatetags
  • left rest_framework/api.html and squad/_user_menu.html
    unchanged since Django Rest Framework does NOT support
    jinja2, nor it's going to be supporting (didn't see any)
    issue addressing that on their repo to date
  • some extra if's had to be added given that django sometimes
    fail silently (tag 'with') whereas jinja doesn't. Found several
    templates that were crashing after migrated to Jinja

All templates (web, email, txt) were migrated to Jinja2, except those in
'squad/templates/django' due to lack of support of Django Rest Framework
along with Jinja. Bellow are a few items worth mentioning:

 - migrated all .html templates to .jinja2
   using Jinja2's syntax
 - kept templatetags, decorating them as global functions
   and filters, following Jinja2 guidelines
 - adjusted settings.py to work properly with Jinja2
 - created squad/jinja2.py, that loads default filters
   from Django and load squad's custom templatetags
 - left rest_framework/api.html and squad/_user_menu.html
   unchanged since Django Rest Framework does NOT support
   jinja2, nor it's going to be supporting (didn't see any)
   issue addressing that on their repo to date
 - some extra if's had to be added given that django sometimes
   fail silently (tag 'with') whereas jinja doesn't. Found several
   templates that were crashing after migrated to Jinja
@chaws chaws force-pushed the migrate-templates-to-jinja2 branch from 64c60af to dfe3d0e Compare October 19, 2018 13:15
@terceiro terceiro merged commit 4b3cd82 into Linaro:master Oct 22, 2018
@chaws chaws deleted the migrate-templates-to-jinja2 branch November 1, 2018 11:07
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.

None yet

2 participants