title: Django foreign key ordering / position
body: <p>I've got a list of items in a Django Model that I'd like to be able to set the order of. Basically a linked list.</p>
  
  <pre><code>class List(models.Model):
        name = models.CharField(max_length=255)
  
  class Item(models.Model):
        list     = models.ForeignKey(List)
        position = models.PositiveIntegerField()
        data     = models.AnyField() 
  
        class Meta:
              unique_together = ('list', 'position')
              ordering = ['position']
  </code></pre>
  
  <p>Here's the model I have in mind. For each ListItem in List, the list position must be unique but it also must be without gaps (e.g. deleting item 4 does not result in the position sequence [1, 2, 3, 5, 6].</p>