Custom Author Model Guide¶
By default the
authors of a story is a many to many field using
auth.User as the model. However you can also specify your own
custom author model to be used. There are some things you will need
to know about change the author model.
1. The initial migration using
South was changed to allow for
this custom many to many field be possible.
2. If your intent is to use a custom model, but have yet to
defined this model, your inital migration uses
the authors many to many model. Later, when your custom author
model is created, you will have to determine your self if the
database table that was created needs to be changed as well.
This is usually the case if your custom model is named anything
User. For example, the table name created using
would be stories_storyauthor with 2 fields user_id and story_id.
While story_id is obvious, user_id is the field that may
change depending on the model name. The example app that is part of
stories defines a authors model named
BasicAuthor. The table
name is still stories_storyauthor, however, the columnes it
needs are basicauthor_id and story_id.
South migration, takes this in account and will
supply the name of the custom field for you. However if you changed the
authors many to many model after the migration, you will need
to determine the new column names and manually adjust them as needed.