I have a model that has one column right now description, which fills an area on several different pages of the site. The client wants this to be split into several different columns so that they can fill in different values in certain parts of the site. Therefore, I need to change this column descriptionto frontpage_descriptionand resourcepage_description. I am trying to find a way to do this in the south, so the column value descriptionis the (initial) default value for both the "new" columns. This is what I still have:
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
db.rename_column('myapp', 'description', 'frontpage_description')
db.add_column('myapp', 'resourcepage_description', self.gf('myfields.TextField')(default='CHANGEME'), keep_default=False)
def backwards(self, orm):
db.rename_column('myapp', 'frontpage_description', 'description')
db.delete_column('myapp', 'resourcepage_description')
models = {
The part I'm interested in is self.gf(...)(default='CHANGEME'), I wonder, is there a way to set the value, descriptionor frontpage_descriptionas the default value for resourcepage_description?
orm, , , , , .
datamigration?