天天看點

建立DJANGO的自定義TAG

DJANGO的TAG分為三類:

• simple_tag : Processes the data and returns a string

• inclusion_tag : Processes the data and returns a rendered template

• assignment_tag : Processes the data and sets a variable in the context

blog_tags.py

latest_posts.html

base.html

無css層展示

建立DJANGO的自定義TAG