static files and images

이다연·2021년 3월 10일
0

Django

목록 보기
13/33

settings.py

import os

STATIC_URL = '/static/'

STATICFILES_DIRS = [
    os.path.join(BASE_DIR, 'static'),
]

create link to static file

base.html

{% load static %}

python manage.py collectstatic

profile
Dayeon Lee | Django & Python Web Developer

0개의 댓글