Re: Proposal: Allow custom redirects in the admin system

2006-02-01 Thread Joseph Kocherhans
On 1/11/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > I hate to request more changes to magic-removal... but that's where > this should happen. Maybe it should wait until after it's been merged > though. > > Currently the redirects after add_stage and change_stage in the admin > system are ha

Re: Proposal: Allow custom redirects in the admin system

2006-01-11 Thread oggie rob
> Also, I don't believe post_url would allow you to use something like the new object id in your url. I needed this capability (I have wizard-like interfaces derived from the admin pages), and ended up modifying change_stage so it read something like this: redir = redir_dict.get(None, '../../')

Re: Proposal: Allow custom redirects in the admin system

2006-01-11 Thread Matthew Flanagan
On 1/12/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > > On 1/11/06, Matthew Flanagan <[EMAIL PROTECTED]> wrote: > > > > I've been looking at the same thing in the last day and I found the > > 'post_url' keyword arg to the add_stage() view that allows you to > > redirect somewhere after adding

Re: Proposal: Allow custom redirects in the admin system

2006-01-11 Thread Joseph Kocherhans
On 1/11/06, Matthew Flanagan <[EMAIL PROTECTED]> wrote: > > I've been looking at the same thing in the last day and I found the > 'post_url' keyword arg to the add_stage() view that allows you to > redirect somewhere after adding a new object but this arg doesn't > exist for the change_stage() vie

Re: Proposal: Allow custom redirects in the admin system

2006-01-11 Thread Matthew Flanagan
On 1/12/06, oggie rob <[EMAIL PROTECTED]> wrote: > > > Another option would be to have the callable return a (url, message) > tuple, and let the view handle HttpResponseRedirect and > request.user.add_message. > > I think you should use a dictionary. For example, you could pass in the > following

Re: Proposal: Allow custom redirects in the admin system

2006-01-11 Thread oggie rob
> Another option would be to have the callable return a (url, message) tuple, and let the view handle HttpResponseRedirect and request.user.add_message. I think you should use a dictionary. For example, you could pass in the following dictionary: {None:'../report1/%s'} and then in the default met

Re: Proposal: Allow custom redirects in the admin system

2006-01-11 Thread Jacob Kaplan-Moss
I think this is a very good idea, and I like the precedent of adding methods to the inner Admin class to influence the admin behavior. I do agree, however, that this should wait until after we finish the magic-removal branch. There's nothing in this proposed change that would break any

Proposal: Allow custom redirects in the admin system

2006-01-11 Thread Joseph Kocherhans
I hate to request more changes to magic-removal... but that's where this should happen. Maybe it should wait until after it's been merged though. Currently the redirects after add_stage and change_stage in the admin system are hardcoded. One of the most frequent requests I get in my projects is t