I'm using Django 1.9.6 + Tastypie to implement RESTFUL api, there is an api that need to fetch data from api whitch is on another server, I don't know how to do it.
All the example I'd found is like this:
from tastypie.resources import ModelResource
from services.models import Product
from tastypie.authorization import Authorization
class ProductResource(ModelResource):
class Meta:
queryset = Product.objects.all()
resource_name = 'product'
allowed_methods = ['get']
authorization = Authorization()
The resource class fetch data from app's models(local database), but what I want is request an API which is on another server in the resource class. Any body know how to do it?
Maybe the question is stupid.
Thanks :)