Hi,
I am trying to write a request Tracking system using the following
models (Re-ordered and some fields removed for clarity)

class Request(models.Model):
    packages=models.ManyToManyField(Package)

class Package(models.Model):
    product=models.ForeignKey(Product)
    components=models.ManyToManyField(ComponentVersion)

class Product(models.Model):
    name=models.CharField(max_length=60)
    required_components=models.ManyToManyField(Component)

class Component(models.Model):
    name=models.CharField(max_length=60)

class ComponentVersion(models.Model):
    component=models.ForeignKey(Component)
    version=models.PositiveIntegerField()

I need to present an interface where the user first creates a request
by selecting 1 or more Packages (done) and is then presented with a
page containing a series of dropdowns allowing them to chose the
ComponentVersions for the packages' products grouped by their
component.

At the moment I have got a set of queries which gives me a list of
querysets for the relevant ComponentVersions.  I was looking at having
a ModelChoiceField for each of these and constructing the form
dynamically but this is messy to validate.  Is there an easier/cleaner
method of doing this?


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to