title: Django - Ordered ManyToManyField
body: <p>I have 2 models in my Django app: <code>Operation</code> and <code>Job</code>. <code>Job</code> model has a many-to-many relationship with <code>Operation</code> model. I use <code>Job</code> model to run multiple <code>Operation</code>s in one go. But I need those <code>Operation</code>s to be executed in a specific order. I can use JSONField to store foreign keys in specific order to do this, but is there a better solution for this? Here are my models:</p>
  <pre><code>class Operation(models.Model):
      name=models.CharField(verbose_name='Operation name',max_length=50)
      merger_operation=models.BooleanField(verbose_name='Merger operation',default=False)
      parser_action=models.ForeignKey(ParserAction,on_delete=models.CASCADE,verbose_name='Parser action')
  
  class Job(models.Model):
      name=models.CharField(verbose_name='Job name',max_length=50)
      operations=models.ManyToManyField(Operation,verbose_name='Pre-request operations')
  </code></pre>