Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

231
Views
Vscode with beautify does not indent django html templates

I am looking to format my django templates in the same manner as HTML.

Beautify ends up treating my templates like text, and not indenting their contents.

For example, after formatting my code looks like this:

<head>
  {% if title %}
  <title>Django Blog - {{ title }}</title>
  {% else %}
  <title>Django Blog</title>
  {% endif %}
</head>

Instead of

<head>

  {% if title %}
    <title>Django Blog - {{ title }}</title>
  {% else %}
    <title>Django Blog</title>
  {% endif %}
</head>

I currently have Beautify & Django extensions installed, running on VSCode and WSL.

settings.json VSCode:

    "files.associations": {
        "**/*.html": "html",
        "**/templates/*/*.html": "django-html",
        "**/templates/*": "django-txt",
        "**/requirements{/**,*}.{txt,in}": "pip-requirements"
    },
    "emmet.includeLanguages": {
        "django-html": "html"
    },
    "beautify.language": {
        "html": [
            "htm",
            "html",
            "django-html"
        ]
    },
    "[django-html]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    }

Why isn't beautify correctly formatting / indenting my templates? How can I resolve this behavior?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can simply right click in HTML file and click format it will automatically ident your file. Actually these extension make vscode auto ident feature active but still you have to do it manually.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!