Add python 3 support using urllib.parse as urlparse.

In utils.py and views.py the "import urlparse" makes incompatible with Python 3, when the module urlparse doesn't exist, instead should use urllib.parse, and if we import urllib.parse as urlparse, less change to the code.