Passing string rather than function in django url pattern
Question: In the [Django
docs](https://docs.djangoproject.com/en/1.7/topics/http/urls/#passing-strings-
instead-of-callable-objects) it says about url patterns:

> It is possible to pass a string containing the path to a view rather than
> the actual Python function object. This alternative is supported for the
> time being, though is not recommended and will be removed in a future
> version of Django.

Does anyone have any insight as to why this the case? I find this alternative
to be quite handy and can't find anything explaining why this is a bad (or, at
least, less than ideal) idea.


Answer: I think the [1.8 Release
Notes](https://github.com/django/django/blob/master/docs/releases/1.8.txt#L695)
in the repo explains it quite well. Here's a summary of the main points:

> In the modern era, we have updated the tutorial to instead recommend
> importing your views module and referencing your view functions (or classes)
> directly. This has a number of advantages, all deriving from the fact that
> we are using normal Python in place of "Django String Magic": the errors
> when you mistype a view name are less obscure, IDEs can help with
> autocompletion of view names, etc.
>
> Thus `patterns()` serves little purpose and is a burden when teaching new
> users (answering the newbie's question "why do I need this empty string as
> the first argument to `patterns()`?"). For these reasons, we are deprecating
> it. Updating your code is as simple as ensuring that `urlpatterns` is a list
> of :func:`django.conf.urls.url` instances.

