How can I combine multiple Resources in TastyPie? I have 3 models I'd like to combine: users, profiles and posts.
Ideally I'd like profiles nested within user. I'm not sure where to go from here.
class UserResource(ModelResource):
class Meta:
queryset = User.objects.all()
resource_name = 'user'
fields = ['username','id','date_joined']
#Improper Auth
authorization = Authorization()
class UserProfileResource(ModelResource):
class Meta:
queryset = UserProfile.objects.all()
resource_name = 'profile'
class UserPostResource(ModelResource):
user = fields.ForeignKey(UserResource,'user', full=True)
class Meta:
queryset = UserPost.objects.all()
resource_name = 'userpost'
#Improper Auth
authorization = Authorization()