Re: Passing argument to Model.save via ModelForm

2009-02-25 Thread bretro...@gmail.com
Thanks, again. def save_model(self, request, obj, form, change): obj.save(request.user.username) did the trick. i should've found that in the docs myself. On Feb 25, 3:58 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Wed, Feb 25, 2009 at 3:56 PM, bretro...@gmail.com

Re: Passing argument to Model.save via ModelForm

2009-02-25 Thread bretro...@gmail.com
This is working fine in my custom interface, but the admin is broken now since it is not passing the argument to the save() function. On Feb 23, 5:56 pm, "bretro...@gmail.com" <bretro...@gmail.com> wrote: > Perfect. Thanks! > > On Feb 23, 5:51 pm, Alex Gaynor <

Re: Passing argument to Model.save via ModelForm

2009-02-23 Thread bretro...@gmail.com
Perfect. Thanks! On Feb 23, 5:51 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Mon, Feb 23, 2009 at 5:40 PM, bretro...@gmail.com > <bretro...@gmail.com>wrote: > > > > > Hello, > > > I'd like to send an email when a Model is saved via it's Mo

Passing argument to Model.save via ModelForm

2009-02-23 Thread bretro...@gmail.com
Hello, I'd like to send an email when a Model is saved via it's ModelForm. I'm aware that I can override the save function of the model, then call it's super but I was wondering how to pass request.user.username to the Model's save function. Or if someone has a better suggestion I'd be willing