Latest Blog Articles

model serializers in Django Rest Framework

model serializers in Django Rest Framework

Model serializers in django rest framework are very similar to the django model forms. By using the model serializers we can reduce the effort of writing the more code for serializers. Model serializers are the shortcuts that allow us to automatically create a serializer with fields that associat...

Read more

object oriented programming in python

object oriented programming in python

Object oriented programming is one of the programming approaches in solving the problems with progamming. Python supports object oriented programming(OOP) approach. While using OOP's in  python we mostly use terms like object, class, method, etc.

Some of the principles of Object Orie...

Read more

working with select_related in django

working with select_related in django

select_related is a queryset method in Django which returns new queryset result for a Django Model. select_related is more helpful in foreign-key relationships. It is useful when we are going to use those foreign-key relationship data later in our code.  select_related is a preformance ...

Read more

using custom widgets in django

using custom widgets in django

In Django we use built-in forms. After rendering the template with form and form fields we can see the equivalent html is generated from the form fields. How Django is doing that ? Well, to generate HTML from the form fields django uses form Widgets. In some cases we need the some specific HTML f...

Read more

Allow remote connections to PostgreSQL

Allow remote connections to PostgreSQL

Working with the PostgreSQL in server is fine. But, sometimes we need to access the server or cloud database from our local machine. But, when we try to connect to the PostgresSQL server database from local it will not connect. Because, by the default configuration PostgreSQL only allows host "lo...

Read more

serializers in Django Rest Framework

serializers in Django Rest Framework

Serializers in django rest framework are similar to django forms. By using django rest framework serializers we can serialize and deserialize the data. We can also validate the incoming data using django rest framework serializers to maintain the integrity of the data. We can divide the django re...

Read more

how to add swap memory in ubuntu

how to add swap memory in ubuntu

In every computer we have a physical memory(i.e: RAM). When a user starts a program it is loaded from the disk (where the program resides) to the RAM, because RAM is faster than the disk memory. Some processes intially need more memory to startup but after it will not use the complete memory that...

Read more

working with supervisor on ubuntu

working with supervisor on ubuntu

In most of the ubuntu virtual private servers it is often case that we will have to run several small programs continuously. The most traditional way to do it is to write a init script in for the program that we want to run continuously. But it is a time consuming process to manage it.

Supervi...

Read more

how to use templates in django

how to use templates in django

Django is a webframework so, It needs to maintain the code in such a way that it should be easy to navigate and easy to read and maintain. As we already know the Django framework is a MVC, we do not write the HTML code in the views.py instead we write it in a template. In django web fra...

Read more

usage of group_by and string_agg in django, postgreSQL

usage of group_by and string_agg in django, postgreSQL

In this article we are going to learn how to optimize the queries in Django applications. Django has a built-in ORM which converts the django query into optimized SQL query. In some cases we need to group the data based on some common django field or a table column. This can also be done without ...

Read more

Introduction to RESTful api's

Introduction to RESTful api's

REST(Representational state transfer) is a one of the architectural(designed with some specific rules and regulations) ways to transfer the data by using the HTTP protocol. In this article we will learn what are the restful api's and why we use it.we'll understand api request format and...

Read more

getting started with django first app

getting started with django first app

Let's get started with our very first django application. I always recommend newbies to use the latest versions of django and python. Python2.X.X has no active support. We generally develop many projects on a single machine with different requirements(python packages). If we install python packag...

Read more

working with for loop in python

working with for loop in python

Let's start working with for loop in python. For loop is used when want to execute a block of code repeatedly a fixed number of times.  Python also comes with the support of iterating the sequences using the for loop. we can use any number of for loops one inside another. we call it as neste...

Read more
Read More Blog Posts