Hi, With my project I'd like to create an industry-aimed application that offers the users to gain a quick and easy overview over different jobs. Therefore I've thought of three database models:
1) The basic Material model. This model consists of simple fields like the name of the material, its size and weight, its purchase price, its stock location etc. 2) The Set model. This model consists of multiple materials and some other simple fields similar to those in 1). 3) The Job overview model. This model consists of multiple sets and some job-related attributes. The basic material model of course is easy to design, but I got stuck at the following problem: How do I define a model field for the set model that lets the user insert the material models like e.g. on a shopping list ("I want 20 units of this, 5 units of that etc.")? My best approach so far would be a ManyToManyField(Material) but this field only lets me define which types of materials I'd like to include in a set, not how many of these materials. Also, as far as I understood, the ManyToManyField links materials and sets bi-directional whereas I'd like only a unidirectional link from set model to material model. I'm sure there's an elegant and sophisticated way to solve this issue (like in many Django uses I've experienced so far), but as I'm quite new to both Django and Python I require a bit of your friendly help, please. ;-) I hope I described my problem properly, if there's something not fully clear, just ask. Best regards and thanks in advance! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---