include와 extends 이용 (pinterest clone 9강)
-Base.html 구성 {% include 'head.html' %} {% include 'header.html' %} {% block content %} {% endblock %} {% include 'footer.html' %} inclued는 다른 template를 import하는 개념으로 이해하면 됨 -Header.html은 상단바에 대한 내용 -footer.html은 하단바에 대한 내용 accountapp 앱 내의 templates에 hello_world.html--> {% extends 'base.html' %} {% block content%} testing {% endblock %} -{block content} ~ {endblock} 사이에 코드 작성 -->base.html이 씌어지고 ..
django
2021. 7. 14. 13:01