Answers for "how to load static in each app django"

8

django static files / templates

from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
    # ... the rest of your URLconf goes here ...
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Posted by: Guest on December-10-2019
5

django static files / templates

STATICFILES_DIRS = [
    os.path.join(BASE_DIR, "static"),
    '/var/www/static/',
]
Posted by: Guest on December-10-2019

Python Answers by Framework

Browse Popular Code Answers by Language