Skip to content

Format the templates using djade #2120

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

Merged
merged 1 commit into from
Apr 3, 2025
Merged

Conversation

matthiask
Copy link
Member

@matthiask matthiask commented Apr 3, 2025

Description

The djade template formatter standardizes load tags, translation tags and some other things.

Using autoformatters is practically always good in my opinion.

Checklist:

  • I have added the relevant tests for this change.
  • I have added an item to the Pending section of docs/changes.rst.

@matthiask matthiask marked this pull request as ready for review April 3, 2025 14:02
self.assertEqual(template_info["context"][2]["content"].strip(), "{{ users }}")
self.assertEqual(template_info["context"][2]["highlight"], True)
self.assertEqual(template_info["context"][3]["content"].strip(), "{{ users }}")
self.assertEqual(template_info["context"][3]["highlight"], True)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason for the offset is that we have another empty line between {% extends %} and {% block %}.

@matthiask matthiask merged commit 2a126e6 into django-commons:main Apr 3, 2025
25 checks passed
@matthiask matthiask deleted the djade branch April 3, 2025 14:11
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