django-orchestra/orchestra/apps/bills/serializers.py
2014-07-23 16:24:56 +00:00

16 lines
341 B
Python

from rest_framework import serializers
from .models import Bill, BillLine
class BillLineSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = BillLine
class BillSerializer(serializers.HyperlinkedModelSerializer):
lines = BillLineSerializer(source='billlines')
class Meta:
model = Bill