Tiny Django Tips – Use cycle instead of boring “if else” in template tags

Use of Cycle in Django Template

Often we need to do alternate things in every steps of a django template for loop while doing things in a loop in a django template. For example, let's say you want to create a widget similar to the following image widget - to show various job types In this example, The Job Type widget…