Skip to content Skip to sidebar Skip to footer

Python South Not Picking Up Changes Made In Add_to_class() Method

I've added a field to the main Django 'User' model, by inserting a User.add_to_class() to Askbot's models.init the added code is the following: #askbot-devel/askbot/models/__init__

Solution 1:

Despite living in your askbot app, this code changes a model in Django's auth app. So according to south, the only thing that's changed is the auth app. Given that this app is not managed by South, you run into a problem.

I'd not recommend using migrations for third-party apps for the simple fact that the migrations get lost in moving the code to different deployment environments.

Your best bet for an existing deployment is to manually add the column to the User database table. New deployments will automatically pick up the new field and create the column during the syncdb command.

Post a Comment for "Python South Not Picking Up Changes Made In Add_to_class() Method"