skip to Main Content

Postgresql – Foreignkey Django separator

There is a model: class Categories(models.Model): name = models.CharField(max_length=150, unique=True, verbose_name='Name') slug = models.SlugField(max_length=200, unique=True, blank=True, null=True, verbose_name='URL') class Products(models.Model): name = models.CharField(max_length=150, unique=True, verbose_name='Name') slug = models.SlugField(max_length=200, unique=True, blank=True, null=True, verbose_name='URL') category = models.ForeignKey(to=Categories, on_delete=models.PROTECT, verbose_name='Categoy') I don't understand…

VIEW QUESTION
Back To Top
Search