Django 1.7 and Python 3 compatability tweaks.