Re: Consider allowing customization of ModelForm's init parameters in contrib.admin

2014-01-15 Thread Loic Bistuer
On Jan 16, 2014, at 8:02 AM, Russell Keith-Magee wrote: > Is there some reason that you can't use get_form() for this? It would seem to > be exactly what you are looking for - a way to control the instantiation of > forms, used by both add_view and change_view. ModelAdmin.get_form() is a bit

Re: Consider allowing customization of ModelForm's init parameters in contrib.admin

2014-01-15 Thread Russell Keith-Magee
Is there some reason that you can't use get_form() for this? It would seem to be exactly what you are looking for - a way to control the instantiation of forms, used by both add_view and change_view. Yours, Russ Magee %-) On Thu, Jan 16, 2014 at 3:22 AM, tyrion-mx wrote: > I'd like to be able t

Consider allowing customization of ModelForm's init parameters in contrib.admin

2014-01-15 Thread tyrion-mx
I'd like to be able to customize the parameters that gets passed to the form used in all the views of the ModelAdmin. It seems that there is currently no way to do it. A very common scenario in which this could be useful is to provide a default value for an author/user field of a model. For exam