I am fairly new to working with Django and I am having trouble linking CSS to my project.
I have included the necessary static settings in my app's configuration, which allows me to access images in the static folder without any issues. However, when attempting to locate CSS files, it doesn't seem to work as expected:
STATIC_DIR = os.path.join(BASE_DIR, 'static')
INSTALLED_APPS = ['django.contrib.staticfiles',]
STATIC_URL = '/static/'
STATICFILES_DIRS = [STATIC_DIR, ]
When trying to include CSS in my HTML file, I encounter problems:
<link rel="stylesheet" href="{% static 'css/mycss.css' %}">
If I want to add an image from a different subfolder within the same static directory, it works just fine:
Any suggestions on what could be causing this issue? Thank you in advance for your help.