roadmap/project/api/viewsets.py
Tyrel Souza 588825332f Splitting serializers. M2M Changes
I took the serializers and put them in their own file.
I made the due dates be attached to the project  with a foreign key, rather than M2M, better admin inline.
2015-03-10 00:14:17 -04:00

19 lines
581 B
Python

__author__ = 'tyrel'
from rest_framework import viewsets
from project.models import Project, Category, DueDate
from project.api.serializers import ProjectSerializer, CategorySerializer, DueDateSerializer
class ProjectViewSet(viewsets.ModelViewSet):
queryset = Project.objects.all()
serializer_class = ProjectSerializer
class CategoryViewSet(viewsets.ModelViewSet):
queryset = Category.objects.all()
serializer_class = CategorySerializer
class DueDateViewSet(viewsets.ModelViewSet):
queryset = DueDate.objects.all()
serializer_class = DueDateSerializer