in my settings.py file i did
STATICFILES_LOCATION='static'
STATIC_URL = '/static/'
STATICFILES_DIR=[
os.path.join(BASE_DIR,'Kevin/static')
]
STATIC_ROOT='static'
but in my templates i am unable to load the files
the template folder is in root directory
whereas static folder is in django root folder named as Kevin which is also in that base folder
in my html template i did the
{% load static %}
i am sharing some code of my template as well so you can have a look
{% load static %}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Kevin - Dashboard</title>
<!-- Custom fonts for this template-->
<link href="{% static 'vendor/fontawesome-free/css/all.min.css'%}" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">
<!-- Custom styles for this template-->
<link href="{%static 'css/sb-admin-2.min.css'%}" rel="stylesheet">
question from:
https://stackoverflow.com/questions/65914965/i-am-unable-to-load-static-files-in-django-although-i-have-done-everything 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…