[Answer]-Heroku/Django Static files

1👍

Install dj-static (a Django static file server) (Getting Started with Django on Heroku)

Installing with pip:

pip install dj-static

settings.py

# Static asset configuration
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/'

STATICFILES_DIRS = (
    os.path.join(BASE_DIR, 'static'),
)

wsgi.py

from django.core.wsgi import get_wsgi_application
from dj_static import Cling

application = Cling(get_wsgi_application())

Leave a comment