Django formfield_for_foreignkey

154 views
Skip to first unread message

Cristian Vargas

unread,
Oct 29, 2014, 8:40:43 PM10/29/14
to django...@googlegroups.com
As i stated in this question i am trying to follow something like this example.

Basically i am trying to set the queryset for a foreign key in my django admin.

It works as intended, but when i check the queries generated (with the help with django-debug-toolbar) i can notice there are too many.
I check the times that method is being called (with a print) and it is being accessed 3 times, with the exact same args (checked that too). Is that intended???...may be one of my tools???...can i fix it somehow???

Thanks for the help

Collin Anderson

unread,
Nov 2, 2014, 7:59:25 PM11/2/14
to django...@googlegroups.com
Hi Cristian,

Maybe you could call traceback.print_stack() to see why it's being called each time.

Thanks,
Collin



Reply all
Reply to author
Forward
0 new messages