title: Using same methods in two models
body: <p>I am customising slug method for auto generating and i am using like this </p>
  
  <p><strong>models.py</strong></p>
  
  <pre><code> class Category(TimeStamp):
      name = models.CharField(max_length=255)
      slug = models.SlugField(max_length=100, unique=True)
  
      def __str__(self):
          return self.name
  
      def _get_unique_slug(self):
          slug = slugify(self.name)
          unique_slug = slug
          num = 1
          while Category.objects.filter(slug=unique_slug).exists():
          unique_slug = '{}-{}'.format(slug, num)
          num += 1
          return unique_slug
  
      def save(self, *args, **kwargs):
          if not self.slug:
              self.slug = self._get_unique_slug()
          super().save(*args, **kwargs)
  </code></pre>
  
  <p>I am using this <strong>_get_unique_slug</strong> method in another model. But I wander if there is beautiful way to right this in mixins. I mean without writing get_unique_slug for each model. How do I this? Thank you?</p>