@register.inclusion_tag('schedule/_daily_table.html', takes_context=True)
def daily_table(context, day, width, width_slot, height, start=8, end=20, increment=30):
 user = context['request'].user
 context['addable'] = CHECK_PERMISSION_FUNC(None, user)
 width_occ = (width - width_slot)
 day_part = day.get_time_slot((day.start + datetime.timedelta(hours=start)), (day.start + datetime.timedelta(hours=end)))
 occurrences = day_part.get_occurrences()
 occurrences = _cook_occurrences(day_part, occurrences, width_occ, height)
 slots = _cook_slots(day_part, increment, width, height)
 context['occurrences'] = occurrences
 context['slots'] = slots
 context['width'] = width
 context['width_slot'] = width_slot
 context['width_occ'] = width_occ
 context['height'] = height
 return context

@ register . inclusion_tag ( 'schedule/_daily_table.html' , takes_context = True ) def daily_table ( context , day , width , width_slot , height , start = 8 , end = 20 , increment = 30 ) : user = context [ 'request' ] . user context [ 'addable' ] = CHECK_PERMISSION_FUNC ( None , user ) width_occ = ( width - width_slot ) day_part = day . get_time_slot ( ( day . start + datetime . timedelta ( hours = start ) ) , ( day . start + datetime . timedelta ( hours = end ) ) ) occurrences = day_part . get_occurrences ( ) occurrences = _cook_occurrences ( day_part , occurrences , width_occ , height ) slots = _cook_slots ( day_part , increment , width , height ) context [ 'occurrences' ] = occurrences context [ 'slots' ] = slots context [ 'width' ] = width context [ 'width_slot' ] = width_slot context [ 'width_occ' ] = width_occ context [ 'height' ] = height return context
display a nice table with occurrences and action buttons .