From ddbeca71773f9908a0dda78876955e8884b268af Mon Sep 17 00:00:00 2001 From: Brandon Taylor Date: Sun, 10 Mar 2013 21:05:10 -0400 Subject: [PATCH] Improved documentation for adding Sortable to an existing model. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0754caa..640f7f5 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ Sortable has one field: `order` and adds a default ordering value set to `order` If you're adding Sorting to an existing model, it is recommended that you use [django-south](http://south.areacode.com/) to create a schema migration to add the "order" field to your model. You will also need to create a data migration in order to add the appropriate values for the `order` column. Example assuming a model named "Category": + def forwards(self, orm): for index, category in enumerate(orm.Category.objects.all()): category.order = index + 1