페이지에 디자인 적용하기 - 스타일 시트 파일 이용.
스타일시트 파일은 장고의 스태틱 디렉터리에 저장
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]
경로: C:\projects\mysite\static
textarea {
width:100%;
}
input[type=submit] {
margin-top:10px;
}
스타일시트 적용해주는 코드 추가
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'style.css' %}">
스태틱파일을 사용하기 위해서는 템플릿 가장 상단에 {% load static %}
태그를 삽입해야 함