Avoid using deprecated django.conf.urls.defaults

Import from django.conf.urls on Django >= 1.4 and fall back to
django.conf.urls.defaults for older versions
Merge commit 'b4fcba854624e593eefb58c6f68c82283dea4322'
No need for code supporting Django pre-1.4.
Tidy code.