Software engineering facts, information, and skills tagged as Django

Search database with regular expression in Django

Varghese Chacko 3 years, 1 month ago

Regex and iregex are  the two field lookups that enable us to search database with regular expressions. regex is case-sensitive where as iregexis case-insensitive.

Django - check for null in database

Varghese Chacko 3 years, 1 month ago


In django, the NULL valuein the database field is tested with field lookup isnull It takes either True or False, which correspond to SQL queries of IS NULL and IS NOT NULL, respectively.

Django field lookup - exact and iexact

Varghese Chacko 3 years, 1 month ago

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

Django-Compress compressJs/CSS of your application forbetter performance of...

Varghese Chacko 3 years, 1 month ago

Django-compress is a Django application that allows us to compress our CSS andJavascript for better performance of the the application. The django compress provides a tag named compress that takes the typr to compress, namely, css and js.  The compressor combines the CSS/JS contained in the tag and save as a single file in static directory. Default location is <STATIC DIRECTORY>/CACHE

Building a form - HTML Vs Django

Priya Philip 3 years, 1 month ago

While creating a simple form in HTML we needs more works to be done in our templates like this:

PG::Error (FATAL: too many connections for role "xxxxxxx")

Varghese Chacko 3 years, 1 month ago

PostgreSQL could be configured to limit number of simultaneous connections to the database. The heroku comes with plans having connection limits. The 'Hopby' plans comes with 20 connections where as standard plans comes startings with 120 conection. When we start developing and testing, especially automated testings, the hobby plans raise error PG::Error (FATAL: too many connections for role "xxxxxxx"). If we check the connections with heroku cli, we get

Python - a general-purpose programming language.

Priya Philip 3 years, 1 month ago

      Python is an interpreted(processed at runtime by the interpreter), object-oriented(supports Object-Oriented style), interactive, simple, easy to learn, portable, extensible, embeddable, high-level programming language for general-purpose programming. Created by Guido van Rossum at the National Research Institute for Mathematics and Computer Science in the Netherlands and first released in 1991. Python is derived from ABC, Modula-3, SmallTalk, Algol-68, C, C++, Unix shell and other scripting languages.Python's source code is avaliable under the GNU General Public License (GPL) which guarantees end users the freedom to run, study, share and modify the software.

Passing multiple variables to Django Template's Assignment Tags

Varghese Chacko 3 years, 1 month ago

Django template tags allows passing multiple variables or values to the assignment tags. Most people knows passing one variable, but not many and we see many questions how to pass it. Most are confused because of the colon separated passing of values to filters. Comma separation wont work either. The Django supports it by putting space as the separator.

Let us talk!

We take the vision which comes from dreams and apply the magic of science and mathematics, adding the heritage of our profession and our knowledge to create a design.