바뀜

둘러보기로 가기 검색하러 가기
86 바이트 추가됨 ,  2022년 9월 25일 (일) 12:28
106번째 줄: 106번째 줄:  
* 앱 안에 <code>templatetags</code> 디렉터리를 만든다.
 
* 앱 안에 <code>templatetags</code> 디렉터리를 만든다.
 
* 이 디렉터리 안에 <code>custom_tags.py</code>를 만든다.(이름은 짓기 나름)
 
* 이 디렉터리 안에 <code>custom_tags.py</code>를 만든다.(이름은 짓기 나름)
 +
* @register 안의 경로는, 해당 필터를 구현할 html 경로를 지정한다.
 
|<syntaxhighlight lang="python">
 
|<syntaxhighlight lang="python">
 
from django import template
 
from django import template

둘러보기 메뉴