On Tue, Jan 6, 2009 at 8:01 PM, ZebZiggle <zebzig...@gmail.com> wrote:
> > Hi all, > > Sorry for the cryptic subject line, but I don't know how else to > describe it. > > I have two tables: > > class Opportunity(models.Model): > ... > > class Deal(models.Model): > opp = models.ForeignKey(Opportunity) > ... > > However, in the admin, I want the user to enter the data for the > Opportunity and then have a table-like UI to add new Deals ... kind of > like a ManyToManyField. I can't use ManyToMany since I don't want the > Opportunity to show any other Deals already created. > > What I don't want, as it will too confusing for the users, is the > default behavior: to have to create an Opportunity and then a bunch of > Deals from which they pick the same Opportunity over and over again. > > Can this be done or do I need to make some sort of custom page for > this? If so, how can I integrate it with the rest of the admin UI just > for the Opportunity table? > This is common and supported, described here: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#inlinemodeladmin-objects Karen --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---