[SOLVED] Problem while loading Static Files In Django | CSS | JS | HTML ,

Опубликовано: 07 Апрель 2026
на канале: Errormania
4,460
36

#django #staticfiles #errors #errormania #ralpasoft
This video helps to fix the not loading problem of static files in Django even the DEBUG is FALSE. This is the easiest and safest solution.

Code To add In your Project

urls.py
from django.urls import path,include
from django.contrib import admin
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
path('admin/', admin.site.urls),
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Settings.py
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
VENV_PATH = os.path.dirname(BASE_DIR)
STATIC_ROOT = os.path.join(VENV_PATH, 'static_root')

errormania a developers community where developers like us join to give solutions to all the programming errors other developers are facing.

join errormania on social media
telegram : - @errormania
Instagram:-   / error_mania  
twitter :- https://twitter.com/Errormania3?s=20
Linkedin:-   / error-man.  .


Ralpasoft is a platform for all the digital services where people can find all the digital services they can think of.
www.ralpasoft.com


[email protected] mail us for more details
[email protected]