Tuesday, July 31, 2018

Re: How to use multiple ForeignKeys

put a foreign key in invoices model that points to vendor model .

On Tue, 31 Jul 2018, 00:38 Alexander Joseph, <Alexander.V.Joseph@gmail.com> wrote:
I'm building a Purchase Order app that uses a ForeignKey for Vendors. I want to be able to use another ForeignKey for invoices once a Vendor is selected. So the choices of Invoices would get filtered based on the users selection of the Vendor. How would I do this in the model? I assume I'd need ajax to load the invoices based on the Vendor in the template? Thanks!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3c0e8bfb-30fb-467f-aa2f-58677e203480%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHV4E-dSB2W2dAkAK_YtvLLyBj%3D33v8VaUtEH%2B1huXmRFu5jeA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment