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

199
Views
El parámetro Python Flask se redondea en Javascript

código pitón:

 from flask import Flask, render_template app = Flask(__name__) @app.route("/") def test(): id = "2138291837273817238" # Can Be some random number return render_template("first.html", id=id) if __name__ == "__main__": app.run("0.0.0.0", 8000)

HTML:

 <!DOCTYPE html> <html> <title>Testing</title> <body style="background-color:#222736;"> <h1 style="color:#f6f6f6">Testing</h1> </body> <script> console.log({{ id }}) </script> </html>

Consola Javascript:

2138291837273817300

Como puede ver, 2138291837273817238 y 2138291837273817300 no son el mismo número. El parámetro siempre se redondea al número 17. ¿Es esto solo un error de JavaScript? ¿Estoy haciendo algo mal? ¿Y alguien puede reproducir esto?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Resuelto: tuve que poner {{ id }} en "´s, por lo que es "{{ id }}", ¡entonces no se redondea!

about 4 years ago · Juan Pablo Isaza 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!