diff options
Diffstat (limited to 'grades/views.py')
-rw-r--r-- | grades/views.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/grades/views.py b/grades/views.py index 67844bd..7403e4e 100644 --- a/grades/views.py +++ b/grades/views.py @@ -1,7 +1,7 @@ from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.forms import inlineformset_factory -from grades.forms import GradingSystemForm +from grades.forms import GradingSystemForm, GradeRangeForm from grades.models import GradingSystem, GradeRange @@ -21,7 +21,7 @@ def add_grading_system(request, system_id=None): if system_id is not None: grading_system = GradingSystem.objects.get(id=system_id) GradeRangeFormSet = inlineformset_factory(GradingSystem, GradeRange, - fields='__all__', extra=0) + GradeRangeForm, extra=0) grade_form = GradingSystemForm(instance=grading_system) is_default = (grading_system is not None and grading_system.name == 'default') @@ -38,7 +38,7 @@ def add_grading_system(request, system_id=None): formset.save() if 'add' in request.POST: GradeRangeFormSet = inlineformset_factory( - GradingSystem, GradeRange, fields='__all__', extra=1 + GradingSystem, GradeRange, GradeRangeForm, extra=1 ) formset = GradeRangeFormSet(instance=grading_system) |