Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add static file in django

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATICFILES_DIRS = [
    BASE_DIR / 'static'
]
# add this code in settings.py
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #add #static #file #django
ADD COMMENT
Topic
Name
2+2 =