Suppose you have a many-to-many relationship in a Django model, for example:
class GroceryList(models.Model): items = models.ManyToManyField(GroceryItem, related_name='in_lists') class GroceryItem(models.Model): name = models.CharField(unique=True)
You and I can have the same elements in two different lists, for example Avocado , and they will point to the same Avocado object.
What is the best way to implement a random order for items in each list that can be edited separately for each list? (i.e. I have Avocado first on my list, and you have index 4 )
The django-ordered-model seems like an interesting solution, but it assumes a global order across all objects.
source share