Python - a general-purpose programming language. image
Python - a general-purpose programming language.

Python is an interpreted(processed at runtime by the interpreter), object-oriented(supports Object-Oriented style), interactive, simple, easy to learn, portable, extensible, embedded, high-level programming language for general-purpose programming. Created by Guido van …

read more
Python magic method __new__ image
Python magic method __new__

Many developers believe that is the first method invoked in the life-cycle of an object. When we create an object or instantiate a class, the first method that gets called …

read more
Infinite iterators in Python image
Infinite iterators in Python

An object representing a stream of data. Repeated calls to the iterator’s method (or passing it to the built-in function) return successive items in the stream. When no more data …

read more
Create sitemap for Django application via sitemap framework's GenericSitemap class image
Create sitemap for Django application via sitemap framework's GenericSitemap class

Sitemaps are very critical for SEO. For a Django application, how can we add sitemap? The Django applications has dynamic content and it is almost impossible to recreate a sitemap …

read more
PEP-8 Style Guide for Python Code and its importance in daily affairs of python developer image
PEP-8 Style Guide for Python Code and its importance in daily affairs of python developer

Pep-8 is theStyle Guide for Python Code. As many of you know, PEP is "Python Enhancement Proposals". They provide standard reference points to write code in pythonic way. PEP-8 is …

read more
Python magic method __init__ image
Python magic method __init__

Python comes with magic methods that starts its name with . The most common one is . What is so magical about ? The method need not be called or …

read more
The Zen of Python - also known as Pep-20 image
The Zen of Python - also known as Pep-20

The Zen of python, also known as Pep-20 is a collection of twenty principles that influences the development in python, by Tim Peters. You can view this on a python …

read more
Customize HTML template for Mezzazine website image
Customize HTML template for Mezzazine website

In our previous blog, we saw how to install and configure Mezzanine blog and up running. As you can see, the site had no fancy design and it is a …

read more
How to install  and do minimum configuration of Mezzanine image
How to install and do minimum configuration of Mezzanine

This article assumes that you are familiar with installing and configuring Django. Mezzanine is a Django project athttp://mezzanine.jupo.org/.It is licensed under BSD.It can be used, modified, and redistributed commercially. There …

read more
Python magic method __del__ image
Python magic method __del__

One of the useful magic method is __del__, which is the python destructor. It doesn't implement the behavior of del(x) instead, it defines the behavior for when an object is …

read more
Django field lookup - contains and icontains image
Django field lookup - contains and icontains

Field lookups are how we specify the conditions in the WHERE clause of an SQL. They are specified as keyword arguments for QuerySet methodslike filter(), exclude() and get(). Check if …

read more
Create sitemap for static  pages in Django application image
Create sitemap for static pages in Django application

We have both static and dynamic pages in a Django application. How will we add static pages to sitemap? It is very simple. As first step, we have to include …

read more
Create sitemap using Django sitemap framework image
Create sitemap using Django sitemap framework

The sitemap framework is very flexible. We can use it to create sitemap for any item in the database, along with custom configurations. The very basic step is to addto …

read more
Python sort arrays in place with built in sort() method image
Python sort arrays in place with built in sort() method

Python provides two methods to sort an array. First one is which sorts the array in place where as returns the sorted array and will not change the original array. …

read more
Python sort dictionaries(dict) by key or values image
Python sort dictionaries(dict) by key or values

Python dictionaries are key-value pairs. Some times we need to sort the dictionary by key or by value. In both cases we can do it by using the built in …

read more
Python sort array of dictionaries by value in the dictionary image
Python sort array of dictionaries by value in the dictionary

One of the cases we face in programming is sorting an array of dictionaries by value in the dictionary. In Python, it is possible to write a one-liner to achieve …

read more
Python sort list of dict by calculated value image
Python sort list of dict by calculated value

We often need to sort a list of dictionaries by calculated value. Python's sorted is very powerful so that it can do literally anything with custom key function Assume that …

read more
Python for engineering your Internet of Things (IoT) Application framework image
Python for engineering your Internet of Things (IoT) Application framework

has already gained it's momentum among IoT developers as it offers readability with syntax without compromising on syntax. In today's era, language doesn't really matter any more when it comes …

read more
Python - Delete item from array by its value image
Python - Delete item from array by its value

Often we encounter the situation where we need to remove item from array by value. For example, if we have an array . We don't know or we are not …

read more
Django - check for null in database image
Django - check for null in database

In django, the NULL valuein the database field is tested with field lookup It takes eitheror, which correspond to SQL queries ofand, respectively. Example: SQL equivalent:

read more