The Lazy Programmer
The Lazy Programmer

Reputation: 125

Django-REST-Framework REST API within django app

I'm wondering if there is a way to access REST API within the Django app.

I created a REST API using the Django rest framework. In the same project, I'm having another app in which I want to fetch data using my own rest API.

Upvotes: 0

Views: 481

Answers (1)

PanTrakX
PanTrakX

Reputation: 71

  • If you want to fetch that data on the client side you need to use and make an http request in javascript.

  • If you want to fetch that data on the server side you already have the data, no need to fetch from the api, if you really need to do that there is the requests module.

Upvotes: 1

Related Questions