Software engineering facts, information, and skills categorized as Software Engineering

How to deal with “SubfieldBase has been deprecated. Use Field.from_db_value...

Varghese Chacko 1 year, 1 month ago

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

Python: ImportError: cannot import name generic

Varghese Chacko 1 year, 1 month ago

After upgrading to django 1.9. Whenever I was executing the command ./manage.py runserver , I got the error :

Python 3: Unexpected Exception: name 'basestring' is not defined when invok...

Varghese Chacko 1 year, 1 month ago

Python 3: Unexpected Exception: name 'basestring' is not defined when invoking ansible2 

Python 3 - Django: ImportError: No module named 'django.core.urlresolvers'

Varghese Chacko 1 year, 1 month ago

Python 3 - Django 2.x: ImportError: No module named 'django.core.urlresolvers' is a common error we get when we migrate from python 2.x to python 3.x and use latest Django > 2.0. the common error message looks like 

How to install Python package from GitHub?

Varghese Chacko 1 year, 2 months ago

How to install Python package from GitHub?

Get the previous months name

Varghese Chacko 1 year, 2 months ago

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. 

Get month name from month number

Varghese Chacko 1 year, 2 months ago

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 that checks for the number and return name.

Clone a sqlalchemy db object with new primary key

Varghese Chacko 1 year, 2 months ago

At many points, a developer may want to clone a row of data for multiple reason. TheSQL Alchemy makeit easy to do in 5 steps. For example we have a table products and clone the product with id 25.

Introduction to Angular JS

Varghese Chacko 1 year, 2 months ago

Angular JS logoAngular JS is a framework in JavaScript. It is distributed as a JavaScript file and could be included in any HTML page with script tag. <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.2/angular.min.js"></script> The angular JS extends the HTMLwith directives. The key directives are ng-app which defines the AngularJS application, the ng-model directive which bids value of HTML controls like input widgets to the app and ng-bind binds application data to the HTML.