bfirsh/django-ordered-model — pull request #33 by yuvadm (2014-06-19 07:33:20+00:00)
Title: Implement hard order values

This branch implements the following invariant (desribed in #19, as well):

Each ordered group of N items will have order values in the range of [0,N)

i.e. there can be no gaps in the order. This invariant is useful in cases where ordered objects carry semantic meaning and allows for reliable querying by order field (Item.objects.get(order=42) will always return the 43rd item).

Test have been updated, and delete() has been implemented properly. Naturally, the delete() order decrement carries some performance penalty.