title: Categories, Subcategories and products in Django
body: <p>so, I have the following problem:</p>
  
  <p>I am trying to create a web app with <code>products</code>, <code>subcategories</code> and <code>categories</code>.<br>
  All of them should be connected, meaning: a product can be connected or associated to a category, subcategory; a subcategory can be connected to one or many categories and so on.<br>
  All of them can be administrated by admin in the Django admin page.
  Here's my models.py (all names are in spanish, but they are pretty self explanatory )</p>
  
  <pre><code>from django.db import models
  
  # Create your models here.
  
  class Producto(models.Model):
      nombre = models.CharField(max_length=200)
  
  
      def __str__(self):
          return self.nombre
  
  
  class Subcategoria(models.Model):
      nombre = models.CharField(max_length=200)
      estado = models.BooleanField(default=True)
      producto = models.ManyToManyField(Producto) # unique=True,
  
      def __str__(self):
          return self.nombre
  
  
  class Categoria(models.Model):
      nombre = models.CharField(max_length=200)
      estado = models.BooleanField(default=True)
      producto = models.ManyToManyField(Producto)
      subcategoria = models.ManyToManyField(Subcategoria)#, blank=True, default=None
  
      def __str__(self):
          return self.nombre
  </code></pre>
  
  <p>This code runs pretty good, except that it automatically adds all existing products to subcategories, categories, all subcategories to categories and so on.<br>
  I am not able to edit or delete, which confuses me.
  Any idea?</p>
  
  <p>Thank you very much !</p>