diff options
author | adityacp | 2020-01-02 15:34:18 +0530 |
---|---|---|
committer | adityacp | 2020-01-02 15:34:18 +0530 |
commit | 29f93bce956af26e1b3ffe5ffc04e02c9f32de59 (patch) | |
tree | 9d7f566a2d7e5d333d34efa3e1c3fa115a54fa92 /grades/views.py | |
parent | d60050dcfe7e32dc720e48942c7457860da79d6b (diff) | |
download | online_test-29f93bce956af26e1b3ffe5ffc04e02c9f32de59.tar.gz online_test-29f93bce956af26e1b3ffe5ffc04e02c9f32de59.tar.bz2 online_test-29f93bce956af26e1b3ffe5ffc04e02c9f32de59.zip |
Change UI in add grades template
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) |