@login_required
def instructors_by_date(request):
    '''Show who taught between begin_date and end_date.'''
    tasks = None

    start_date = end_date = None

    form = DebriefForm()
    if 'begin_date' in request.GET and 'end_date' in request.GET:
        form = DebriefForm(request.GET)

    if form.is_valid():
        start_date = form.cleaned_data['begin_date']
        end_date = form.cleaned_data['end_date']
        rvs = ReportsViewSet()
        tasks = rvs.instructors_by_time_queryset(start_date, end_date)

    context = {'title': 'List of instructors by time period',
               'form': form,
               'form_helper': bootstrap_helper_get,
               'all_tasks': tasks,
               'start_date': start_date,
               'end_date': end_date}
    return render(request, 'workshops/instructors_by_date.html', context)

#------------------------------------------------------------
dataset/ETHPy150Open swcarpentry/amy/workshops/views.py/instructors_by_date/original