From c0fc673cb1ecdf9002a74133e0965fada0bc76fb Mon Sep 17 00:00:00 2001 From: Victor Gomide Date: Fri, 7 Jun 2019 22:28:43 -0300 Subject: [PATCH] fix(#12): change class position --- students/views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/students/views.py b/students/views.py index f2dfb45..36ef946 100644 --- a/students/views.py +++ b/students/views.py @@ -4,11 +4,6 @@ from rest_framework import viewsets from .serializers import StudentLoginSerializer, StudentFieldsSerializer -class StudentForm(StudentForm): - class Meta: - model = Student - fields = ['nome', 'matricula', 'email', 'senha'] - class StudentLoginViewSet(viewsets.ModelViewSet): queryset = Student.objects.all() serializer_class = StudentLoginSerializer @@ -17,6 +12,11 @@ class StudentFieldsViewSet(viewsets.ModelViewSet): queryset = Student.objects.all() serializer_class = StudentFieldsSerializer +class StudentForm(StudentForm): + class Meta: + model = Student + fields = ['nome', 'matricula', 'email', 'senha'] + def list_students(request): students = Student.objects.all() return render(request, 'students.html', {'students': students})