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

199
Vistas
Javascript not showing up on template in django

I do not understand why my javascript files are not being applied on my templates. Here is my base.html:

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Project</title>
    <link rel="stylesheet" type="text/css"  href="{% static 'css/styles.css' %}" />
    <link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'assets/css/main.css' %}">
    
</head>
<body>
    <div>
        {% include "navbar.html" %}
        {% block content %}  
        {% endblock content %}
    </div>
    {% include "scripts.html" %}
</body>
</html>

Here is my scripts.html:

{% load static %}

<script src="{% static 'js/main.js' %}"></script>
<script src="{% static 'assets/js/jquery.min.js' %}"></script>
<script src="{% static 'assets/js/jquery.dropotron.min.js' %}"></script>
<script src="{% static 'assets/js/browser.min.js' %}"></script>
<script src="{% static 'assets/js/breakpoints.min.js' %}"></script>
<script src="{% static 'assets/js/util.js' %}"></script>
<script src="{% static 'assets/js/main.js' %}"></script>

However, they don't seem to affect the template. For example, the dropdown menu is in a weird format if I run the server. Another weird thing happening is that Main.js keeps being printed on the console. I believe this was initially because of the main.js file which had:

console.log("Main.js");

However, even though I change it to the following:

console.log("Something new for the console");

I still get Main.js printed out on the console. Moreover, if I put console.log("something") for my other javascript files referenced above, they don't get printed out on the console. I have no idea why this is happneing. Thanks, and please ask any questions.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Clean up cached images and files!

If you are using Chrome, you can follow the following steps:

  1. go to setting
  2. click on privacy security
  3. click on clear browsing data
  4. check 'Cached images and files'
  5. click on 'Clear data'
about 4 years ago · Juan Pablo Isaza 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