fusionbox/django-widgy — pull request #71 by gavinwahl (2013-06-15 00:31:38+00:00)
Title: login_required support for UrlconfIncludePages

For anonymous users, we don't install the login_required urls. This means that when they visit a login_required url, they get a 404 -- not the expected redirect to the login page. To rectify this, try resolving the request again, this time only using UrlconfIncludePages. If it resolves this time, we know to redirect_to_login.

The other way to do this would be to try to recursively decorate each url we were including. This seems complex. Here is an implementation that does it that way: http://djangosnippets.org/snippets/2532/

Another option, of course, is to disable the login_required feature on UrlconfIncludePages. It's a cool feature though.