:) 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() 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 <[EMAIL PROTECTED]> wrote:
>
> > 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 the arguments that were
> > passed in?
>
> > For example, if some_view is passed in as the view_func, is there a
> > way to change it to another_view, so another_view is executed instead?
>
> > Thanks for the help!
>
> > Leif
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to