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

281
Vistas
String with white space being passed incorrectly in a Django template

I have a variable called "Vintage White" that I am trying to pass to an attribute of an input element like so.

<input name={{ attribute_value }}>

What I expect is for the element to be rendered like this

<input name="Vintage White">

But instead I get this

<input name="Vintage" white>

How do I pass the entire string with white spaces to the input element so that I get my expected result?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You need to use quotation marks, otherwise the value will end before the first space of the attribute_value, so:

<input name="{{ attribute_value }}">
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