Will this do? http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ForeignKey.limit_choices_to
You could always fallback on doing the droplist manually. Tim. On Friday 08 May 2009 14:23:36 cfiles wrote: > Still stuck on this one. Does anybody have any ideas? > > On Apr 29, 8:36 am, cfiles <[email protected]> wrote: > > Let me try to explain this a little more. Here are some example models > > > > class Account(models.Model): > > user = models.ForeignKey(User) > > name = models.CharField('Name on Account', max_length=100) > > description = models.CharField(max_length=100) > > date_added = models.DateField(auto_now_add=True, blank=True) > > > > class Payment(models.Model): > > account = models.ForeignKey(Account) > > date_paid = models.DateField(auto_now_add=True, blank=True) > > amount = models.DecimalField(max_digits=10, decimal_places=2) > > > > When I display the form for a Payment I get all of the Account > > objects. I want to limit the list to accounts that the user owns. How > > is this done? I have looked an I am unable to find the documentation > > for it. > > 1 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

