Re: Class based views: A standard hook for http-method-independent code

2012-03-04 Thread Charlie "meshy" Denton
Firstly, please excuse my double post: I didn't realise posts are vetted, so I thought it had been lost. The very significant advantage of this being a hook (instead of overriding dispatch) is that it allows you to call methods that require dispatch to have already set variables (eg: self.kwarg

Re: Class based views: A standard hook for http-method-independent code

2012-03-02 Thread Charlie "meshy" Denton
I would like to see something like this too. I my suggestion is here: https://gist.github.com/1957251 This method has two advantages: 1. You can modify the request, args, and kwargs before they get saved to the view. 2. You can execute code after request, args, and kwargs are saved but before t

Re: Class based views: A standard hook for http-method-independent code

2012-03-02 Thread Charlie "meshy" Denton
I'd like to see something like this too: my suggestion is here: https://gist.github.com/1957251 This implementation also allows you to play with the request, args and kwargs before they are saved on the model. On Mar 1, 6:38 pm, Marc Tamlyn wrote: > Hi all, > > Apologies if this has been raised