style errors

This commit is contained in:
Oliver 2017-04-11 23:15:17 +10:00
parent 0ca8a75166
commit 4a74cd2199
2 changed files with 3 additions and 6 deletions

View File

@ -2,8 +2,6 @@ from rest_framework import serializers
from .models import ProjectCategory, Project, ProjectPart
from part.serializers import PartBriefSerializer
class ProjectPartSerializer(serializers.ModelSerializer):
@ -21,7 +19,6 @@ class ProjectBriefSerializer(serializers.ModelSerializer):
""" Serializer for displaying brief overview of a project
"""
class Meta:
model = Project
fields = ('pk',
@ -46,7 +43,7 @@ class ProjectCategoryBriefSerializer(serializers.ModelSerializer):
class Meta:
model = ProjectCategory
fields = ('pk','name','description')
fields = ('pk', 'name', 'description')
class ProjectCategoryDetailSerializer(serializers.ModelSerializer):

View File

@ -2,9 +2,10 @@ from rest_framework import generics
from .models import ProjectCategory, Project, ProjectPart
from .serializers import ProjectBriefSerializer, ProjectDetailSerializer
from .serializers import ProjectCategoryBriefSerializer, ProjectCategoryDetailSerializer
from .serializers import ProjectCategoryDetailSerializer
from .serializers import ProjectPartSerializer
class ProjectDetail(generics.RetrieveAPIView):
queryset = Project.objects.all()
@ -17,7 +18,6 @@ class ProjectList(generics.ListAPIView):
serializer_class = ProjectBriefSerializer
class ProjectCategoryDetail(generics.RetrieveAPIView):
queryset = ProjectCategory.objects.all()