Ask Your Question
0

Using python south with add_to_class()

asked 2012-04-29 08:19:27 -0500

paulus_almighty gravatar image paulus_almighty flag of United Kingdom
239 3 4 14

So I've added a field to the models.__init__ file using the dynamic mechanism of add_to_class()

Eg

#askbot-devel/askbot/models/__init__.py
User.add_to_class('show_interesting_tags', models.BooleanField(default = False))

I want this modification to be picked up when I run South, which I would normally do by

$ ./manage.py schemamigration askbot --auto
Nothing seems to have changed.

As you can see it doesn't pick up the changes.

Any ideas? For instance how was the field 'show_country' added to the migration?

delete close flag offensive retag edit

Be the first one to answer this question!

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2012-04-29 08:19:27 -0500

Seen: 69 times

Last updated: Apr 29 '12