class LineChartDataSerializer(serializers.ModelSerializer): class Meta: model = LineChartData fields = ('date','price') # order_by = (('date',)) # ordering = ['-date']
class CompanyForLineChartsSerializer(serializers.ModelSerializer): data = LineChartDataSerializer(many=True, source='linechartdata_set') class Meta: model = CompanyForLineCharts fields = ('company', 'data')
--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-fram...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.