파이썬 django include tag1 파이썬 Django include 태그 파이썬 Django include 태그 include 태그를 사용하면 현재 템플릿 내부에 템플릿을 포함할 수 있다. 이것은 많은 페이지에서 동일한 내용 블록이 있는 경우에 유용하다. template.html Hello This page contains a footer in a template. {% include 'footer.html' %} Check out the two templates to see what they look like, and views.py to see the reference to the child template. views.py from django.http import HttpResponse from django.template import loader def testing.. 2024. 3. 9. 이전 1 다음