Monday, October 24, 2022

how to show liste filtre admin django ManyToOne

how to show liste filtre admin django ManyToOne in this case :

in -----------

class Personne(models.Model):

name= models.CharField(max_length=50,blank=False) def __str__(self): return

class Project(models.Model):

title= models.CharField(max_length=50,blank=False) note= models.CharField(max_length=50,blank=False) def __str__(self): return self.title

class Task(models.Model):

title= models.CharField(max_length=50,blank=False) projecttasktask= models.ForeignKey(Project, on_delete=models.CASCADE) personnetask= models.ForeignKey(Personne, on_delete=models.CASCADE) def __str__(self): return self.title

in ---------------


list_filter = ()

How can i filtre in Project by tasks and specialy by Personne

liste dropdown of personne and show me liste of projects ?

best ragards

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

No comments:

Post a Comment