So let me give you a working sample.
Your settings.py could be like this
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]
Up here, I have a folder in my project root called 'static' which contains folder like 'css', 'js' etc. You also need to set this up in your urls.py so it can be accessible to the template. So I would do it like this:
from django.contrib import admin
from django.urls import path
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
path('', user_login),
path('admin/', admin.site.urls),
]
urlpatterns += staticfiles_urlpatterns()
Then at the top of your HTML page, import the static files
{% load static from staticfiles %}
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css'%}">
<link rel="stylesheet" href="{% static 'css/style.css'%}">
I hope this helps
flask
. What are you using, Django or flask?STATIC_URL = '/static/'
{% load static %}