DEBUG = False ALLOWED_HOSTS = ["*"] ... STATIC_ROOT = os.path.join(BASE_DIR, 'static') STATIC_URL = '/static/'
from django.contrib import admin from django.urls import path from django.urls import include, path,re_path from django.views.static import serve from django.conf import settings from django.conf.urls.static import static urlpatterns = [ ..., re_path(r'^static/(?P<path>.*)$', serve, {'document_root': settings.STATIC_ROOT}), ]
python manage.py collectstatic