0

I have 2 folders containing my static files (admin, and assets).
However, when I run python manage.py collectstatic, only the static files in the admin folder are collected.

Below is a code snippet for static files in settings.py

STATIC_URL = 'static/'

STATTICFILES_DIRS = [
    BASE_DIR/ "asert"
]

STATIC_ROOT = (BASE_DIR/"asert/")

enter image description here

Below are some urls linking to the static files from an html page

<link rel="stylesheet" type="text/css" href="{% static 'assets/css/assets.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'assets/vendors/calendar/fullcalendar.css' %}">

<!-- TYPOGRAPHY ============================================= -->
<link rel="stylesheet" type="text/css" href="{% static 'assets/css/typography.css' %}">

<!-- SHORTCODES ============================================= -->
<link rel="stylesheet" type="text/css" href="{% static 'assets/css/shortcodes/shortcodes.css' %}">

<!-- STYLESHEETS ============================================= -->
<link rel="stylesheet" type="text/css" href="{% static 'assets/css/style.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'assets/css/dashboard.css' %}">
<link class="skin" rel="stylesheet" type="text/css" href="{% static 'assets/css/color/color-1.css' %}">
Ankit Tiwari
  • 4,438
  • 4
  • 14
  • 41
  • You have a typo here STAT**T**ICFILES_DIRS and take a look at this answer https://stackoverflow.com/questions/66437690/django-html-template-cant-find-static-css-and-js-files/66439076#66439076 – Ivan Starostin Sep 01 '22 at 17:50
  • `BASE_DIR` is not defined. – D.L Sep 03 '22 at 10:21

0 Answers0