. I like this way because it does not introduce too much extra code into the codebase.
I'd really like if I could just add an include function called decorated_include and pass the decorator and the urls to include to that function. It would do the same thing this bit of code is doing.
On Thursday, September 20, 2012 11:22:01 AM UTC-5, Garry Polley wrote:
Currently I am having to choose between two ways to decorate 3rd party apps views:
What I would like to do is this:
url(r'^authurls', login_required(include('someapp.urls'), login_url='path/to/login'))
So 2 questions:
1) What does everyone else do to accomplish this?
2) What should 3rd party apps (or Django) do to allow you to decorate their views, if they should at all?