Tag Archives: Django REST framework

Django REST framework – Setting permissions

Let’s continue our example in

 

So now we have a working endpoint @ http://127.0.0.1:8000/custom/get/.
django-rest-framework-permissions-1
Continue reading Django REST framework – Setting permissions

Advertisement

Django REST framework – Create endpoints for custom actions

We have talked about how to use Django REST framework to create a RESTful backend for model CRUD.

 

But sometimes we would like to have some backend endpoints for non-model actions. Here is a very good article written by Jeremy Satterfield about non-model endpoints on Django REST framework.

 

The Django REST framework offer us a few ways to implement the web service. Some of them are very convenience to use but in return giving you less flexibility. The following example will make use of the APIView class to create a custom GET request end point.
Continue reading Django REST framework – Create endpoints for custom actions

Django – Setup Django REST framework

We have the Django welcome page working already.

 

I would like to create some REST services on that setup. We could make use of the Django REST framework.

Let’s keep working on our <project_root>/django_poc project to manage articles by REST. The example in this post are based on the Django REST framework quickstart tutorial. It’s good to go through all of them which could give you a more thorough idea on how the REST framework works.

1. Install the Django REST framework in your virtualenv.

pip install djangorestframework

Continue reading Django – Setup Django REST framework