Allows managers to quickly fill in the default workshifts for a few given
    workshift pools.

def fill_shifts_view(request, semester):
    """
    Allows managers to quickly fill in the default workshifts for a few given
    workshift pools.
    """
    page_name = "Fill Shifts"

    fill_regular_shifts_form = None
    fill_social_shifts_form = None
    fill_humor_shifts_form = None
    fill_bathroom_shifts_form = None
    fill_hi_shifts_form = None
    reset_all_shifts_form = None

    managers = Manager.objects.filter(incumbent__user=request.user)
    admin = utils.can_manage(request.user, semester=semester)

    if admin:
        fill_regular_shifts_form = FillRegularShiftsForm(
            data=request.POST,
            semester=semester,
        )
        fill_humor_shifts_form = FillHumorShiftsForm(
            data=request.POST,
            semester=semester,
        )
        fill_bathroom_shifts_form = FillBathroomShiftsForm(
            data=request.POST,
            semester=semester,
        )
        reset_all_shifts_form = ResetAllShiftsForm(
            data=request.POST,
            semester=semester,
        )
    # XXX: BAD! We should filter by pool owners? By Manager bool flags? By
    # arbitrary django permissions?
    if admin or managers.filter(title="Social Manager"):
        fill_social_shifts_form = FillSocialShiftsForm(
            data=request.POST,
            semester=semester,
        )
    # XXX: See above
    if admin or managers.filter(title="Maintenance Manager"):
        fill_hi_shifts_form = FillHIShiftsForm(
            data=request.POST,
            semester=semester,
        )

    fill_forms = [
        fill_regular_shifts_form, fill_social_shifts_form,
        fill_humor_shifts_form, fill_bathroom_shifts_form,
        fill_hi_shifts_form, reset_all_shifts_form,
    ]
    fill_forms = [
        form
        for form in fill_forms
        if form is not None
    ]

    for form in fill_forms:
        if form and form.is_valid():
            count = form.save()
            messages.add_message(
                request,
                messages.INFO,
                "{} {} {}".format(
                    form.message, count, p.plural("workshift", count),
                ),
            )
            return HttpResponseRedirect(wurl(
                "workshift:fill_shifts",
                sem_url=semester.sem_url,
            ))

    return render_to_response("fill_shifts.html", {
        "page_name": page_name,
        "forms": fill_forms,
    }, context_instance=RequestContext(request))