I just added the num object, and tried adding it to my admin, but I get the following error: Exception Value:
no such column: game_riddle.num
Here is the class:
class Riddle(models.Model):
"""represents a riddle, comprising a question and hints"""
world = models.ForeignKey(World)
question = models.TextField()
num = models.IntegerField()
I have a small database and the last time I added the object I had to run:sqlclear and then syncdb
How can I fix my bug without clearing the database?
Read this documention: http://south.readthedocs.org/en/0.7.6/installation.html
easy_install South
After install, put ‘south‘ in your installed_app in settings
Don’t forget to sync: python manage.py syncdb
Run this command: python manage.py schemamigration app_name –auto
The migrate: python manage.py migrate
That’s it. Next if you add new model or have changes. Just do step 5 and 6 and your model will be updated.