0

jquery does not load - Page not found (404)

base.html

{% load static %}
<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap CSS -->
    <link href="{% static 'bootstrap-5.0.0/css/bootstrap.css' %}" rel="stylesheet">
    <link href="{% static 'css/style.css' %}" rel="stylesheet">
    <!-- jQuery -->
    <script src="{% static 'jquery/jquery.js' %}"></script>
 </head>

setting.py

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'ServiceCRM3/static'),]
  • static folder created
  • the script is in the path static / jquery / jquery.js
  • bootstrap picks up ok in the same folder
  • the server restarted

what's wrong?

Ivan Starostin
  • 8,798
  • 5
  • 21
  • 39
JopaBoga
  • 157
  • 11

0 Answers0