Blog

Viewing posts tagged django rest framework

How to create an easy Restful API for a simple model in Django(Part V)

How to create an easy Restful API for a simple model in Django(Part V)

How to deploy using Nginx, Gunicorn and Supervisord

In previous posts we created a model in Django, created a way to add/modify/delete/search and filter via the Django admin. Then we created a restful API for this model using Django Rest Framework, we added filter and search functionality into the API and finally we added Swagger documentation so our clients can understand our API. But we did not deploy this in any machine. We only use manage.py runserver to check that is working.

How to start a Django Rest Framework Project in github

How to start a Django Rest Framework Project in github

Let's assume that your project will be call citiesprj, and your project folder ~/projects, your first app will be called cities and your env will be called cities too.

Swagger: How to create an easy Restful API for a simple model in Django(Part IV)

How to create an easy Restful API for a simple model in Django(Part IV)

If you have been following the previous 3 posts you have now your API 'running'(not deployed yet in production) but you may need to allow your customers to understand your API. In other words, you documentation for your API. Today the winning in that space is Swagger and it can be used not only for Python and Django but almost for every web framework available today. It is Open Source so you can even contribute to the project if your language or framework is not yet supported.

How to create an easy Restful API for a simple model in Django(Part III)

How to create an easy Restful API for a simple model in Django(Part III)

Following with previous post we can go now to authentication and permissions.

How to create an easy Restful API for a simple model(Part II)

How to create an easy Restful API for a simple model(Part II)

In the previous post (http://www.restapibuilder.com/blog/how-to-create-an-easy-restful-api-for-a-simple-model/) I explained a little bit how to create a basic API for a City model. I used our home page in order to create the serializer, modelviewset and url needed to our first move.