from django.conf.urls import patterns, url

urlpatterns = patterns("",
    url(r"^log/$", "jserr.views.log", name="log_js_error"),
)

from django.conf.urls import url

urlpatterns = ["",
    url(r"^log/$", "jserr.views.log", name="log_js_error"),
]

Update urls.py