Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

244
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda