@register.inclusion_tag('datapages/templatetag_templates/cycle_selector.html')  
def cycle_select_block(cycled_object_list):
    selected_cycle = None
    cycles = []
    selected_cycle_object = None
    if cycled_object_list:
        selected_cycle_object = get_cycle_details(cycled_object_list[0])
        
        for this_cycled_object in cycled_object_list:
            cycles.append(get_cycle_details(this_cycled_object))
        # sort the list after we're done so it appears sorted in the select list
        cycles = sorted(cycles)
    display = 0 > len(cycles)
    is_selectable = len(cycles) > 1
    
    print cycles
    return { 'cycles': cycles, 'selected_cycle_object':selected_cycle_object, 'display':display, 'is_selectable':is_selectable }
dataset/ETHPy150Open sunlightlabs/read_FEC/fecreader/summary_data/templatetags/cycle_selector.py/cycle_select_block/swapped operands of `>`