Hi,
I've two models related by a ForeignKey field.
I'd like to have the possibility of adding child objects (side "One" of
the relation) from the admin interface of the parent ("Many" side of the
relation).
Example:
class Child(models.Model):
name = models.CharField(max_length=10)
class Parent(models.Model):
name = models.CharField(max_length=10)
childs = models.ForeignKey(Child)
In this example, a dropdown is shown on the admin that let's me choose
just one child or create another if the one I need doesn't exist.
The point is, how can I have a list that lets me choose more than one
child and create them as needed?
This is not a Many to Many relation, because every child belongs just to
one parent, but the widget I need is like the one from that kind of
relation in the admin interface (ie: Groups selection in the User edit
admin view).
Thanks you very much.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---