Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django :How to integrate Django Rest framework in an existing application?

How should I integrate Django-REST-API framework in an existing application or I have to create a new project?

like image 953
Grish Avatar asked Jun 25 '14 06:06

Grish


People also ask

Can we use Django and Django REST framework together?

Django Rest Framework makes it easy to use your Django Server as an REST API. REST stands for "representational state transfer" and API stands for application programming interface. Note that with DRF you easily have list and create views as well as authentication.


1 Answers

You do not need to begin a new project. The basic steps are:

  1. Install DRF, something like pip install djangorestframework
  2. Add rest_framework to your INSTALLED_APPS
  3. Define your serialisers, views and routes.

And that's it.

I suggest you follow the Quickstart and step through the Tutorial — it's pretty welcoming really.

I hope that helps.

like image 92
Carlton Gibson Avatar answered Oct 14 '22 23:10

Carlton Gibson