Django 3.1 serving static files on deployment

58 Views Asked by At
STATIC_ROOT = BASE_DIR / "static"
STATIC_URL = '/static/'

MEDIA_URL = '/images/'

STATICFILES_DIRS = []

I have my static paths in settings.py file like this and it works fine on local machine but when i try to runserver on server it can't load static files and i couldn't access any detailed information on the web for deploying static files on django==3.1 DEBUG=True.

Thanks in advance.

1

There are 1 best solutions below

0
tealy On

In DEBUG=True no need to collectstatic or setting STATIC_ROOT.