Re: Hacking admin changes

2007-04-04 Thread Kent Johnson
Kent Johnson wrote: > Enrico wrote: >> Can't you just override the 'save' method of your model? > > Maybe I can. I think I once had a reason not to do that but I can't > remember it :-) Yes, this is fine, thanks for nudging me in the right direction. Kent --~--~-~--~~

Re: Hacking admin changes

2007-04-04 Thread Kent Johnson
Aidas Bendoraitis wrote: > I would have written a request_middleware instead of what you did. I > think, it would be cleaner. The middleware would have to inspect each request to find the ones it actually cares about. It seemed cleaner to me to use the url dispatch to do this for me. Thanks, K

Re: Hacking admin changes

2007-04-04 Thread Kent Johnson
Enrico wrote: > Can't you just override the 'save' method of your model? Maybe I can. I think I once had a reason not to do that but I can't remember it :-) Thanks, Kent --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: Hacking admin changes

2007-04-04 Thread Aidas Bendoraitis
I would have written a request_middleware instead of what you did. I think, it would be cleaner. Regards, Aidas Bendoraitis [aka Archatas] On 4/4/07, Enrico <[EMAIL PROTECTED]> wrote: > > Can't you just override the 'save' method of your model? > > Or maybe use a 'pre_save' or 'post_save' signa

Re: Hacking admin changes

2007-04-04 Thread Enrico
Can't you just override the 'save' method of your model? Or maybe use a 'pre_save' or 'post_save' signal. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to d

Hacking admin changes

2007-04-04 Thread Kent Johnson
In my application I want to intercept changes made through the admin interface so I can make additional changes based on the changes made by the user. In other words, if the request has a new value for attribute 'foo', I want to compute a new value for attribute 'bar' and add that to the request.