Sankalp Jonna

Django Tutorials


Managing concurrency in Django using select_for_update

JULY 17, 2021

A tutorial on how one can use select_for_update to lock a Django queryset until the transaction it is in is committed in order to handle concurrency.

Continue reading →

Use get_object_or_404 in Django to write lesser code

JUNE 27, 2021

While writing APIs that retrieve a single object from your database, it is best to use get_object_or_404 as it can help you save 4 lines of code and convert it into 1 line.

Continue reading →

Save your Django models using update_fields for better performance

JUNE 12, 2021

A tutorial on how update_fields() can be used make the save() method more efficient in the Django ORM

Continue reading →

Write better queries using values_list in Django

MAY 29, 2021

A tutorial on how values() or values_list() can be used to optimize performance of the Django ORM

Continue reading →

Using abstract models in Django

MAY 23, 2021

A tutorial on leveraging inheritance to write elegant and reusable code when developing Django apps

Continue reading →

Representing foreign key values in Django serializers

MAY 9, 2021

A tutorial on how to represent model relationships in Django serializers.

Continue reading →

Deploy Django apps using a PaaS

APRIL 25, 2021

Thoughts on why you should use a Platform as a Service to deploy your Django apps followed by some tutorials on the same.

Continue reading →

Error handling for Django applications using email

APRIL 18, 2021

A tutorial on using gmail/mailgun to send error emails to yourself for effective monitoring of your Django applications

Continue reading →

How to override the save method in your Django models

APRIL 11, 2021

A tutorial on how to best perform actions before or after a Django model is saved to the database

Continue reading →

Running a 'bulk update' with Django

APRIL 4, 2021

A tutorial on updating multiple rows atomically using a single operation on your database with Django methods

Continue reading →

API permissions made easy using Django Rest Framework

MARCH 20, 2021

A tutorial on how to authenticate your APIs and give role based access using minimal lines of code.

Continue reading →

5 best Django books for all skill levels in 2021

MARCH 7, 2021

No matter what your current skill level is, these 5 books are sure to enhance your Django development chops.

Continue reading →

How timezones work in Django

FEBRUARY 28, 2021

Users should be able to interact with your Django application in their local time zone. Here is how you can achieve this.

Continue reading →

Flask vs. Django: Which framework to choose in 2021?

FEBRUARY 20, 2021

How to decide between two equally popular web frameworks that serve a common goal?

Continue reading →

Why use Django in 2021?

FEBRUARY 13, 2021

How Django takes away a lot of hassle when it comes to web development and why you should consider using it.

Continue reading →

The right way to use a ManyToManyField in Django

JANUARY 31, 2021

A detailed explanation of how a many-to-many relationship works in Django and all the caveats associated with using the ManyToManyField

Continue reading →

Pagination made easy with Django Rest Framework

JANUARY 9, 2021

A tutorial on how to make your APIs paginated with minimal lines of code.

Continue reading →

Building a Django CRUD application in minutes

DECEMBER 5, 2020

A structural guide and tutorial for building a Django CRUD application at lightning speed using the Django Rest Framework library

Continue reading →