I have a simple to-do list with activities that can be ordered by the user. I use the model List, with a many-to-many field to the model Activities.
Now I need a way to store the user defined ordering of the activities on the list. Should I go with an extra field in my List model to store the order of my activity primary keys like this:
class List(models.Model):
activities = models.ManyToManyField(Activity)
order = models.CommaSeperatedIntegerField(max_length=250)
Or should I go with a solution in the Activity model, like described here: https://djangosnippets.org/snippets/998/
What method can be considered as best practice?