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

280
Views
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 answers
Answer question

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 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!