You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Hi,
I am using a ModelChoiceField in a simple FormSet (not a ModelFormSet). When rendering the FormSet, Django duplicates the ModelChoiceField queryset for each row of the FormSet and repeats the same query multiple times to fill the select boxes. Is there a standard solution to cache the ModelChoiceField queryset after the first query and re-use it for the rows 2 to N ?
I have found these solutions or this one, but they look like ugly hacks to me.
Any help appreciated!
jxro...@gmail.com
unread,
Apr 6, 2018, 5:08:32 AM4/6/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message