Wrote a model where you can add companies and information about them.
class Company(models.Model): name = models.CharField("company Name", max_length = 80) city = models.CharField("City", max_length = 80) background = models.ImageField("Background", upload_to="annex/img/%Y/%m/%d", default=") def __str__(self): return self.name return self.city class Meta: verbose_name = "All companies" verbose_name_plural = "All companies"
Please help, how can I make it so that depending on the authenticated user, in this model, only display the corresponding record ?