stephenmcd/mezzanine — pull request #1136 by wrwrwr (2014-10-16 19:18:06+00:00)
Title: LOGIN_URL with view or pattern name

Django 1.5+ [lets you](https://docs.djangoproject.com/en/dev/ref/settings/#login-url) set ``LOGIN_URL`` to a view name (e.g. ``"mezzanine.accounts.views.login"``) or a URL pattern name (such as ``"login"`` defined in ``accounts.urls``). There are also some undocumented, but working cases of giving a view method or a translation proxy (e.g. ``_("/account/login/")``) as the value .

Changing a bit of custom redirect logic in ``PageMiddleware`` to ``contrib.auth`` provided ``redirect_to_login`` makes it all work and probably doesn't break anything :-)