Skip to content

Commit

Permalink
fix(#12): change class position
Browse files Browse the repository at this point in the history
  • Loading branch information
victorcommite committed Jun 8, 2019
1 parent b5ef6a4 commit c0fc673
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions students/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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})
Expand Down

0 comments on commit c0fc673

Please sign in to comment.