2017-02-11 17:06:19 +00:00
|
|
|
from rest_framework import serializers
|
2017-04-10 15:46:51 +00:00
|
|
|
from django_countries.serializer_fields import CountryField
|
|
|
|
|
2017-02-27 21:43:31 +00:00
|
|
|
from longclaw.longclawshipping.models import Address, ShippingRate
|
2017-02-11 17:06:19 +00:00
|
|
|
|
|
|
|
class AddressSerializer(serializers.ModelSerializer):
|
2017-04-10 15:46:51 +00:00
|
|
|
country = CountryField()
|
2017-02-11 17:06:19 +00:00
|
|
|
|
|
|
|
class Meta:
|
|
|
|
model = Address
|
|
|
|
fields = "__all__"
|
|
|
|
|
|
|
|
class ShippingRateSerializer(serializers.ModelSerializer):
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
model = ShippingRate
|
|
|
|
fields = "__all__"
|
|
|
|
|
|
|
|
|