Actually, it doesn't work properly: the migration generated by south contains the following:
---------------------
# Adding M2M table for field books on 'Shelf' db.create_table('myapp_shelf_books', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), ('shelf', models.ForeignKey(orm['myapp.shelf'], null=False)), ('book', models.ForeignKey(orm['myapp.book'], null=False))
))
---------------------
Which means that the sort_value column is not recognized by south, which will cause problems later on, since the column won't be created in the database
From my previous comment: south.aeracode. org/docs/ customfields. html#extending-
> 1) south needs introspection rules (see http://
> introspection), the following appear to work (with south 0.7.1 and trunk version of sortedm2m)
Actually, it doesn't work properly: the migration generated by south contains the following: ------- -------
db.create_ table(' myapp_shelf_ books', ( AutoField( verbose_ name='ID' , primary_key=True, auto_created= True)),
(' shelf', models. ForeignKey( orm['myapp. shelf'] , null=False)),
(' book', models. ForeignKey( orm['myapp. book'], null=False)) ------- -------
-------
# Adding M2M table for field books on 'Shelf'
('id', models.
))
-------
Which means that the sort_value column is not recognized by south, which will cause problems later on, since the column won't be created in the database