[Answered ]-Django url dispatcher uses strings to specify function, why?

2👍

urlpatterns = [
    url(r'^articles/2003/$', 'myapp.views.special_case_2003'),
]

Code like this is out of date. Providing the view as a string like this is deprecated in Django 1.8, and does not work in Django 1.10+. In Django 1.10+, you must use the callable.

Leave a comment