+ 1
How to display product categories using css, with django templates
Django frameworks
2 Answers
+ 4
Use {% for category in categories %} {% endfor %} template tag. Inside such a loop you can place a category HTML. {{ category.name }} for example will give category instance's attribute. CSS works as usually in templates. Although you would need to link a CSS file by {% static 'appname/css/style.css' %}. Also it's necessary to load static tag template library in the beginning of your template. I.e. {% load static %} if I am not mistaken.
+ 3
And of course you should pass categories into the template context by means of a view or context processors.