588825332f
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.
18 lines
436 B
Python
18 lines
436 B
Python
__author__ = 'tyrel'
|
|
from rest_framework import serializers
|
|
from project.models import Project, Category, DueDate
|
|
|
|
|
|
class ProjectSerializer(serializers.HyperlinkedModelSerializer):
|
|
class Meta:
|
|
model = Project
|
|
|
|
|
|
class CategorySerializer(serializers.HyperlinkedModelSerializer):
|
|
class Meta:
|
|
model = Category
|
|
|
|
|
|
class DueDateSerializer(serializers.HyperlinkedModelSerializer):
|
|
class Meta:
|
|
model = DueDate |