Use django.conf.urls.patterns

  from django.conf.urls import patterns
is used instead
  from django.conf.urls.defaults import patterns
(only if available), as the second one is deprecated in newer versions of Django.

(Also, some not used imported method is removed)