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