Django 1.5 compatibility

Made minimal changes so it runs with Django 1.5 (url syntax in template and change in how redirect is done in urls.py)