def edit_cutoffs(request, course_slug, activity_slug):
    course = get_object_or_404(CourseOffering, slug=course_slug)
    activity = get_object_or_404(CalLetterActivity, slug=activity_slug, offering=course, deleted=False)    
    if request.method == 'POST':
        form = CutoffForm(request.POST)
        if form.is_valid(): # All validation rules pass
            activity.set_cutoffs(form.cleaned_data['cutoffs'])
            activity.save()