Decorate 3rd party app's views

2012-09-20 Thread Garry Polley
Currently I am having to choose between two ways to decorate 3rd party apps views: 1) Use a middleware (http://stackoverflow.com/questions/2164069/best-way-to-make-djangos-login-required-the-default) 2) Use some url 'magic' to apply the decorator (http://stackoverflow.com/questions/2307926/i

Re: Decorate 3rd party app's views

2012-09-21 Thread Garry Polley
clude 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: > > 1) Use a middleware ( > http://stac

Re: Decorate 3rd party app's views

2012-09-21 Thread Garry Polley
Here is a more reusable way to do this: https://gist.github.com/3762045 On Friday, September 21, 2012 8:02:34 AM UTC-5, Garry Polley wrote: > > Here is an example of yet another way to do it > http://pastebin.com/JUnk4epK. I like this way because it does not > introduce too muc