Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

242
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda