diff options
author | Palaparthy Adityachandra | 2020-02-28 13:43:48 +0530 |
---|---|---|
committer | GitHub | 2020-02-28 13:43:48 +0530 |
commit | ce0cdc307312d4da803abb3377cf7562b3fbcb4b (patch) | |
tree | b1303ee3214c0e1ff0581d9ce96495c7efde6cd7 /grades/views.py | |
parent | 32f1d4dc7816bbb93f6dda77591eeb75c3f30c0d (diff) | |
parent | b4751e0c1783a71c6672554114ccdf5a78c6b47f (diff) | |
download | online_test-ce0cdc307312d4da803abb3377cf7562b3fbcb4b.tar.gz online_test-ce0cdc307312d4da803abb3377cf7562b3fbcb4b.tar.bz2 online_test-ce0cdc307312d4da803abb3377cf7562b3fbcb4b.zip |
Merge pull request #652 from adityacp/revamp_ui
Revamp UI in moderator and student dashboard
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) |