I'm trying to think of how I would make a purchase order app, where the 
purchase order itself has its details/information (vendor name, shipping 
type, payment terms, etc.) but it also has an unspecified (could be 1, 
could be 10, could be 20) actual purchase items with their own 
details/information (qty., description, price per unit, etc.). 

Pretty sure on the model side I would just make two seperate models, one 
for purchase orders and one for purchase items with a ForeignKey to relate 
the purchase items back to its corresponding purchase order, but on the 
view side (I'm using CBVs) would you just include both models in the 
CreateView/UpdateView/DeleteView? And on the template side I'm having 
trouble thinking how this would work, other than first creating your 
purchase order, then having some sort of frankenView for the purchase order 
DetailView/CreateView for purchase items. Thats the only solution I can 
think of without a bunch of fancy AJAX to put a form for the purchase items 
inside the CreateView form for the purchase order. Does anyone know of a 
better way to do this?? 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 [email protected].
To post to this group, send email to [email protected].
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/5786952d-a28a-4dbc-abc2-9d79153d3ded%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to