Assign index to ManyToMany through model
<p>Is it possible to assign an index on objects in a ManyToMany relationship? If I have these models:</p>

<pre><code>class Group(models.Model):
    items = models.ManyToManyField(GroupItem, unique=False, through=GroupItem)

class GroupItem(models.Model):
    group = models.ForeignKey(Group, unique=False)
    index = models.IntegerField()
</code></pre>

<p>When I create a group item, I would like to be able to sort that item by index. So if for example I have a group:</p>

<pre><code>MyGroup = [MyItem1, MyItem2, MyItem3]
</code></pre>

<p>But I'd like <code>MyItem3</code> to be the first item like so:</p>

<pre><code>MyGroup = [MyItem3, MyItem1, MyItem2]
</code></pre>

<p>How can I do that? Bonus if I can have the index automatically increase as more objects are added to the <code>Group</code></p>