ash84.io
--writing
--tags
--about
/ search
⌘K
ash84.io
/
tags
/
template
#template
2 posts
2015-07-06
jinja template - extend block 이용하기
기존에는 `{%include "head.html" %}` 이런식으로 html 내 특정 부분, 즉 자주 사용하는 부분을 모든 페이지에 붙여서, `include` 지시자를 이용해서 가져오는 방식을 사용해 왔었다. 작은 프로젝트에서는 head.html 을 따로 두고 그 안에서 css 및 기타 `` 부분에 들어가는 코드를 작성해서 재활용 했었다.
2015-03-09
jinja template length , substring
때론 프론트 단에서 처리하는게 편리한게 있기에. 기억하고자 적어둔다. flask 에서 `render_template` 해야 하지만, length 와 substring 은 아래와 같이 쓴다. 그나마 substring은 비슷한데 length 사용법이 파이썬과는 다르다.
~/tags/template · 2 posts
/
search
t
/
esc
↑
↓
이동
↵
열기
esc
닫기
pagefind