You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running into the same problem that I originally had from #5 again, now that I've switched from using models & forms separately in subadd to utilizing ModelForms to avoid redundancy. This is in trying to find the proper solution to #11, which I just closed, as everything seems to be working, except for accessing the query of the Substance records.
The text was updated successfully, but these errors were encountered:
...which I have replaced with sub = forms.ModelChoiceField(queryset=subadd.Substance), along with at least a dozen other variations (including variations of from imports).
from subadd.models import Substance
[...]
sub = forms.ModelChoiceField(queryset=Substance.objects.all())
Later, you may want to change that queryset dynamically, for instance to filter by the currently-logged-in user. A pretty solid example of doing this is here:
How exceedingly odd, I could swear that I tried exactly that. I bet I tried every combination of things like it, but never matched up those 2 lines properly. m(
Thank you for your input, sir. It is much appreciated.
Running into the same problem that I originally had from #5 again, now that I've switched from using models & forms separately in
subadd
to utilizingModelForms
to avoid redundancy. This is in trying to find the proper solution to #11, which I just closed, as everything seems to be working, except for accessing the query of theSubstance
records.The text was updated successfully, but these errors were encountered: