I've a site which is running perfectly in when DEBUG=True
in settings.py but when I change DEBUG=False
it stops serving the static files.
From settings.py
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, "static_dir"),
)
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
From urls.py
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
From base.html
{% load staticfiles %}
<!-- Cerulean theme -->
<link rel="stylesheet" href="{% static 'bootstrap.min.css' %}">