I have a few restricted areas on the site, for which I would like to specify login_required
decorator. However I would like to do that once per inclusion in main urls.py, not per individual url in included urls.py
So instead of:
/private/urls.py:
(r'^profile/$', login_required(profile)),
I'd do something along the lines:
/urls.py
urlpatterns = patterns('',
...
(r'^private/', login_required(include('private'))),
)
Except that it doesn't work, unfortunately.