0

Is there something wrong with this code, i have been checking the code for errors but it does not seem to display the required CSS and JS on the web page.

{% load static %}

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>Network Scanner</title>
    <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"/>
    <link rel="stylesheet" href="{% static 'fa/css/all.min.css' %}">
    <script src="{% static 'js/bootstrap.min.js' %}"></script>
  </head>
  <body>
<h2>Test to see if this works</h2>
  </body>
</html>
  • Does this answer your question? [Loading external script with jinja2 template directive](https://stackoverflow.com/questions/3412275/loading-external-script-with-jinja2-template-directive) – samuei Mar 04 '21 at 05:44

1 Answers1

0

If you're loading stylesheets/scripts, try just putting the path to them inside the href attribute. (No brackets). I just looked at the jinja docs and it says that expressions should be used using {{ }}

codeR developR
  • 468
  • 3
  • 13