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

250
Views
Django no puede cargar el archivo javascript pero no tiene problemas para servir un archivo css en el mismo directorio

Recibo un error al cargar el recurso: el servidor respondió con un estado de 404 (No encontrado) para el archivo javascript. La página se carga bien, pero el recurso javascript no se obtiene a pesar de estar en la misma carpeta estática que el archivo css que Django no tiene problemas para recopilar.

configuración.py

 STATIC_URL = '/static/' BASE_DIR = os.path.dirname(os.path.dirname(__file__)) #STATIC_ROOT = os.path.abspath(os.path.join(os.path.dirname(BASE_DIR), 'static')) STATIC_ROOT = 'static/' STATIC_DIR = os.path.join(BASE_DIR, 'static') STATICFILES_DIR=[STATIC_DIR]

html

 {% load static %} asdfs <link rel="stylesheet" type="text/css" href="{% static 'polls/styles.css' %}"> <body id='app'> <p>i'm testing again</p> <li><a href="www.google.com">google</a></li> <script type="text/javascript" src="{% static 'polls/reactfile.js' %}"></script> </body> </html>
about 4 years ago · Juan Pablo Isaza
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!