I think i solved it. This is the chain of method calls of admin.ModelAdmin:
...
change_view
get_form
formfield_for_foreignkey
...
get_form receives the current object as parameter, so all I had to do was to
inject obj in the request:
def get_form(self, request, obj=None, **kwargs):
On Thursday, May 5, 2011 10:32:47 PM UTC+1, juanpa wrote:
>
> Hello,
>
> Is it possible to obtain a reference to the modified object
> in ModelAdmin.formfield_for_foreignkey?
>
> Thanks!
>
>Juan Pablo
>
What do you mean, modified? formfield_for_foreignkey is used for defining
the form, long
Hello,
Is it possible to obtain a reference to the modified object
in ModelAdmin.formfield_for_foreignkey?
Thanks!
Juan Pablo
--
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.co
3 matches
Mail list logo