@PM2Ring I have a model in Django
class Category(models.Model):
#bydefault every model has one column-id which is primary key column
parentId=models.ForeignKey('self',on_delete=models.CASCADE,null=True)
name = models.CharField(max_length = 200, db_index = True)
slug = models.SlugField(max_length = 200, db_index = True, unique = True)
What problem I am facing is that if I crate the category from the shell then it is allowing me. I crated one like this:
Category.objects.create(name='Vehicles',slug='vehicles').save()