class PostSet(models.Model):
title = models.CharField(max_length=50, verbose_name=u'title')
introduce = models.CharField(u'introduce', max_length=50)
class Post(model.Model):
title = models.CharField(max_length=50, verbose_name=u'title')
introduce = models.CharField(u'introduce', max_length=50)
class ShowSerialzer(serializers.Serialize):
title = serializers.CharField()
introduce = serializers.CharField()
post = Post.objects.all()
post_set = PostSet.objects.all()
How I can comebine two queryset( as above post, post_set ) from two
different model combine to one ShowSerialzer?
Anyone some advice?Thanks a lot!
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.