from rest_framework import serializers
from .models import Portfolio, Transaction

class PortfolioSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = Portfolio
        fields = ('id', 'name', 'net_earnings', 'owner_id')

class TransactionSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = Transaction
        fields = (
          'ticker',
          'instrument_name',
          'number_of_shares',
          'trade_date',
          'close_out_date',
          'buy_price',
          'sell_price',
          'net_earnings',
          'portfolio_id'
          )

2fe73d684a78d885f3127daf1daf62e725347ce4
<mask token>

<mask token>


class TransactionSerializer(serializers.HyperlinkedModelSerializer):


    class Meta:
        model = Transaction
        fields = ('ticker', 'instrument_name', 'number_of_shares',
            'trade_date', 'close_out_date', 'buy_price', 'sell_price',
            'net_earnings', 'portfolio_id')

<mask token>


class PortfolioSerializer(serializers.HyperlinkedModelSerializer):


    class Meta:
        model = Portfolio
        fields = 'id', 'name', 'net_earnings', 'owner_id'


class TransactionSerializer(serializers.HyperlinkedModelSerializer):


    class Meta:
        model = Transaction
        fields = ('ticker', 'instrument_name', 'number_of_shares',
            'trade_date', 'close_out_date', 'buy_price', 'sell_price',
            'net_earnings', 'portfolio_id')

from rest_framework import serializers
from .models import Portfolio, Transaction


class PortfolioSerializer(serializers.HyperlinkedModelSerializer):


    class Meta:
        model = Portfolio
        fields = 'id', 'name', 'net_earnings', 'owner_id'


class TransactionSerializer(serializers.HyperlinkedModelSerializer):


    class Meta:
        model = Transaction
        fields = ('ticker', 'instrument_name', 'number_of_shares',
            'trade_date', 'close_out_date', 'buy_price', 'sell_price',
            'net_earnings', 'portfolio_id')

from rest_framework import serializers
from .models import Portfolio, Transaction

class PortfolioSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = Portfolio
        fields = ('id', 'name', 'net_earnings', 'owner_id')

class TransactionSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = Transaction
        fields = (
          'ticker',
          'instrument_name',
          'number_of_shares',
          'trade_date',
          'close_out_date',
          'buy_price',
          'sell_price',
          'net_earnings',
          'portfolio_id'
          )
