Hi,

I have a model like the following;

class elements(models.Model):
    name=models.CharField(max_length=21)


class grouping(models.Model):
    name=models.CharField(max_length=48)
    elementgroup=models.ForeignKey(elements)



I'm assuming this means that a grouping may relate to multiple elements, but
an element may only be related to a single group.

When I view the 'change grouping' page in the default admin interface
generated I noticed a couple of things I don't understand;

the 'elementgroup' field, shows a drop-down list of all defined elements,
including those referred to by other groupings. Why is that when an element
can only be related to a single group? Surely it should only show unused
elements, or no elements?

the 'elementgroup' field is displayed as a single line drop-down box that
only permits the selection of a single element. I was expecting something
more like a list with functionality to add or remove multiple items?
(..along with the '+' option to create a new element if it is not available)

What I'm not really sure of is whether I'm seeing default admin interface
behaviour, or whether I'm misunderstanding something fundamental in terms of
databases/one-to-many/many-to-many relationships and what they mean. Out of
the whole end-to-end skillset involved, RDBMS is my weakpoint.

Thanks,

AlienBaby / matt.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.

Reply via email to