Django Signals image
Django Signals

Django Signalsallowsdecoupled(independent) applicationsget notified when certain events occur elsewhere in the framework with the help of 'signal dispatcher'. The'signal dispatcher' is Django's mechanism usedto send and receive messages between different …

read more
Python sort arrays with sorted method image
Python sort arrays with sorted method

Python provides a methodwhich returns the sorted array and will not change the original array, where as with change the array in place. sorted This method sorts the list and …

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
The New (computer) Testament image
The New (computer) Testament

In 2007, I have translated apoetry about computers and posted on perl monks for fun. Just copy pasting it here, just for fun. Note: Translated to English from a Malayalam …

read more
Search and replace unicode zero width characters <U+200B> image
Search and replace unicode zero width characters <U+200B>

When we copy-paste text from applications like MS-Word or similar to our HTML or text files, we end-up having unicode characters in the file, ultimately leading to different issues. In …

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
Concatenate two columns in results of SQL query in PostgreSQL image
Concatenate two columns in results of SQL query in PostgreSQL

Very often, you will have the requirement to concatenate two columns in a table, on the fly in SQL. For example, first name and last name needed to be combined …

read more
HttpRequest methods image
HttpRequest methods

HttpRequestrepresents an incoming HTTP request, including all HTTP headers and user-submitted data Returns the originating host of the request using information from theandheaders,in that order only ifis enabled. Example: Note …

read more
Article default image
AngularJS Services - The singleton data and code sharing method

Angular services are used to organize code across the application and are wired together using Dependency Injection. Angular services are lazily instantiated, i.e, they are instantiated only when an application …

read more
Django-Compress compressJs/CSS of your application forbetter performance of the application image
Django-Compress compressJs/CSS of your application forbetter performance of the application

Django-compress is a Django application that allows us to compress our CSS and Javascript for better performance of the the application. The django compress provides a tag named compress that …

read more
How to deal with “SubfieldBase has been deprecated. Use Field.from_db_value instead.” in Python image
How to deal with “SubfieldBase has been deprecated. Use Field.from_db_value instead.” in Python

How to deal with "SubfieldBase has been deprecated. Use Field.from_db_value instead."On upgrade to Django 1.9, we may now get the warning To fix this,you should just removeline and addand As …

read more
Get month name from month number image
Get month name from month number

How can we get the month name from the month number? For instance, if I have 3, I want to return march? Most simple method is to define a function …

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
Install specific git commit with pip image
Install specific git commit with pip

To install specific git commit with pip, You can specify commit hash, branch name, tag. For the branch name and the tag, you can also install a compressed distribution. This …

read more
Clone a sqlalchemy db object with new primary key image
Clone a sqlalchemy db object with new primary key

At many points, a developer may want to clone a row of data for multiple reason. The SQL Alchemy make it easy to do in 5 steps. For example we …

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
What's a good way to check if a cookie exist in JavaScript? image
What's a good way to check if a cookie exist in JavaScript?

What's a good way to check if a cookie exist using Javascript? The cookie is available to Javascript via So the easiest method is to write a function that checks …

read more
Get the previous months name image
Get the previous months name

Often we need to get previous months name in python, especially, when we have to save report from previous month's name. In python its is pretty simple. 1. Get first …

read more
Django field lookup - exact and iexact image
Django field lookup - exact and iexact

Field lookups are how we specify the conditions in the clause of an SQL. They are specified as keyword arguments for QuerySet methodslike, and . As a convenience when no …

read more
What is @permalink and get_absolute_url in Django? image
What is @permalink and get_absolute_url in Django?

What is and in Django? When and why to use it? Both and are concerned with allowing you to reverse the URL for a particular object and should be used …

read more
Obtaining statistics for Net::FTP transfers image
Obtaining statistics for Net::FTP transfers

With Net:FTP for uplink and downlink file transfers, we may have problems with obtaining the same statistics that are provided by ftp when you perform a manual transfer, i.e file …

read more