Re: Allow a limit_choices_to callable to accept the current model instances object

2018-09-25 Thread Tim Graham
There's a ticket with that feature request: https://code.djangoproject.com/ticket/25306 On Tuesday, September 25, 2018 at 6:25:38 PM UTC-4, Ochui Princewill wrote: > > Hello, > > Am current working on a project and i want to filter the content of a > ForeignkeyField base on the current model ob

Allow a limit_choices_to callable to accept the current model instances object

2018-09-25 Thread Ochui Princewill
Hello, Am current working on a project and i want to filter the content of a ForeignkeyField base on the current model object class Subscription(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) plan = models.ForeignKey(Plan, on_delete=models.CASCADE) e