The Promise

It was a year today since her father died. She jumped at every knock on the door, but when the parcel arrived, the shock paralysed her. She froze as the postman asked her to ‘sign here please madam’…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Building Django API Views Without Django Rest Framework

Couple days ago I decided to explore the idea of creating Django API views without the famous Django Rest Framework also known as DRF. Don’t get me wrong DRF is a unique toolkit for building web APIs and you should use it as much as possible. The bad thing about such toolkits is that they hide a lot of complexities about the underlying technologies and people fail to learn how exactly do they work. I am on the other hand a guy who loves to tinker around with such technologies I decided to implement couple of Django API views for an application of mine. So that is exactly what we are going to do.

Just a side note before we begin. I won’t be going into details about Django Framework or the Rest Framework for that matter. Also this article assumes that you have a basic understanding of how Django operates and overall basic understanding of web technologies such as APIs, etc.

First I want to put thing into perspective for you guys. I am working on a project of mine for quite some time and I wanted to add a basic subscription functionality to it where I can pull a list of all subscribers of my application via a GET API endpoint and of course add new subscribers to the list via POST API endpoint. Sound easy enough right? Lets dive in a see how exactly we can achieve that.

The next step is to propagate the new changes of our model into the database schema. This is achieved by running the following commands.

Add a comment

Related posts:

In Defense of Kyle Rittenhouse ?

The verdict is either still stinging you or it made your week. It either validated your belief that no matter what you as an American have the right to defend yourself or this justice system is so…

Muslim Nonprofit Shelter Serves Needs of Neglected Elderly Women in Texas

Dallas-Fort Worth based, Texas Muslim Women’s Foundation offers permanent housing solution for elderly Muslim women in need of trauma-informed counseling, peer community and financial support. K’s…

On your 51st birthday

On this which would have been your 51st birthday, it is our 1st experience of your favourite day without you. Birthdays were a big deal, the ultimate expression of your enigmatic personality, you…