[Answered ]-How to programatically insert HTML in a Django template based on attributes in a model

2👍

I think what you want to go after is the ifchanged.

https://docs.djangoproject.com/en/dev/ref/templates/builtins/#ifchanged

Leave a comment