Support for Django 1.6

In Django 1.6 
 - `django.conf.urls.defaults` is removed. This fix updating to new place and keeping compatibility with Django < 1.4
 - `setup_environ` is removed. This fix update to use env.