0
I’m trying to deploy an app I started in Jango on Heroku, but I’m having trouble loading the css/js/imgs files, follow below as my folders and settings related to it!
py Settings.
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static/')
# Extra places for collectstatic to find static files.
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static/'),
)
I load css like this:
<link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.css' %}"/>
<link rel="stylesheet" href="{% static 'template/style.css' %}" />
<link rel="stylesheet" href="{% static 'fontawesome/css/fontawesome-all.min.css' %}" />
my problem is that I can deploy but I can’t load the Static files on the page!
has already run the command Heroku run python Manage.py collectstatic
– user175365