Re: Custom middleware: using process_view to modify the view_func

2008-10-10 Thread barbara shaurette
:) Thanks for this - it does seem simple in retrospect, but I've been banging my head against the same problem too. On Sep 17, 11:53 am, intrepidweb <[EMAIL PROTECTED]> wrote: > FYI, I answered my own question. It's pretty simple, actually. If you > want process_view() to override the view_func()

Re: Custom middleware: using process_view to modify the view_func

2008-09-17 Thread intrepidweb
FYI, I answered my own question. It's pretty simple, actually. If you want process_view() to override the view_func() that was passed in, simply return new_view_func(). Similarly, if you want to override the view_args, just return view_func(view_args). Duh. On Sep 16, 1:37 pm, intrepidweb <[EMA

Custom middleware: using process_view to modify the view_func

2008-09-16 Thread intrepidweb
Hi there, I'm working on a custom middleware class for the first time. My goal is to write a process_view function that modifies the view_func and/or view_args that were passed in. The documentation states that process_view can either return None or an HttpResponse. But is there a way to modify