Movies – Recently Watched

Pi (1998) :

Darren Aronofosky has never disappointed you, has he? Requiem for a dream, Black Swan, The Fountain etc. are some of the movies he has directed. Pi is a nice movie to watch. Shot in black and white, this movie is about a geeky mathematician who is trying to figure out something, a pattern, which has some deeper meaning to it. This movie is very intense and the whole paranoia of the character displayed is really nice. Overall, it’s a good movie.

Jacob’s Ladder (1990):

Sometimes you need a dose of mind-bending movies and this movie really fits well. You get an intelligent, nail biting plot which has so many twists and turns that makes you thinks about a lot of possibilities. The movie is weird, creepy and unique. A Must watch!

Leaving Las Vegas (1995):

I had never thought that Nicolas Cage, an actor of so many pathetic movies, would have ever got an Oscar for his acting. But, boy, has he acted in this movie. What a fantastic flick! The chemistry between Cage and the actress, Elizabeth Shue, is quite amazing. They seem so natural in the roles they play. The whole emotions and vulnerability of the characters that has been shown, seems so genuine and flawless.

Like Father, Like Son (2013): 

These Japanese directors try to keep the things very simple and this is where they get distinguished. This movie has got a very unexpected plot which I should not be talking about. Just watch this beautiful movie and get overwhelmed with the simplicity of the characters.

Django Update 1.6 to 1.9 – 1.8 to 1.9

Upgrading DJango from 1.8 to 1.9 was relatively easier as the main pain of upgrading DRF was all dealt with when I was upgrading Django from 1.6 to 1.8, which has been discussed here. A lot of libraries has to be updated which I came to know as and when I tried running the application.

One of the main issues that I had while the whole upgrade was creating the migration from scratch. The project had South for managing the migration, but since Django has now its inbuilt support, I removed this South and all the existing migration files. There were some circular dependency issues when creating the new migration. You may get an error as below.

django.db.migrations.graph.CircularDependencyError: partner.0001_initial, address.0001_initial, users.0001_initial

The reason was with some of the foreign keys. Django internally creates a graph data structure to figure out this dependency. You can get rid of it by removing the foreign keys temporarily, running the migrations and then creating the keys again.

These following libraries had to go for an update, mentioned with the version that I am using with the Django version 1.9:

Django Reversion 1.10.0, Django tables 2 1.0.5, Django Mptt 0.8.0,  Django Celery 3.2.1, Django Extensions 1.7.3, Django Haystack 2.5.1, Django Redis Cache 1.7.1, Django Redis Session 0.5.6

There are setting changes around the library – Pipeline. You can find the changes to be done on the library’s documentation page. The new settings are as such:

"STATICFILES_FINDERS - 'pipeline.finders.PipelineFinder', 
        'stats': {
            'source_filenames': (
            'output_filename': 'js/stats.js',

Other than this, there were some code changes which were introduced in Django 1.9, for which I had to change some import statements. Some frequent Django and other libraries’ issues:


from django.db.models.loading import get_models
ImportError: No module named loading


from django.apps import apps


from django.utils.importlib import import_module
ImportError: No module named importlib


from importlib import import_module


class ProductAdmin(reversion.VersionAdmin):
AttributeError: 'module' object has no attribute 'VersionAdmin'


from reversion.admin import VersionAdmin


NameError: name 'reversion' is not defined


from reversion import revisions


django.utils.log.NullHandler class not found


Use logging.NullHandler

This is pretty much it. Django upgrade is more of a task which needs a lot of patience than other things. Happy upgrading.