Django for Designers: Difference between revisions
Content added Content deleted
imported>Paulproteus (→Django templates 101: Where do you put the tag template?) |
imported>Paulproteus (→Django templates 101: Higher clarity) |
||
Line 542: | Line 542: | ||
Our tag view gets fed in a variable we can use -- the name of the tag, so we add that to the context. That makes it available to the template to render. |
Our tag view gets fed in a variable we can use -- the name of the tag, so we add that to the context. That makes it available to the template to render. |
||
Let's make our tag template. To do that, create a new file called ''tag.html'' in the same directory as ''index.html''. |
Let's make our tag template. To do that, create a new file called ''tag.html'' in the same directory as ''index.html'' that you just created. |
||
<source lang="html4strict"> |
<source lang="html4strict"> |