Mising step after adding __unicode__ methods to models; syncdb needs to be re-run.
|Reported by:||Brendan_Munnelly||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Greetings from Dublin, Ireland.
After adding the unicode() method to the Poll and Choice definitions in models.py, I called the Poll.objects.all() method again in the interpreter.
But to no effect :-(
Exited the interpreter.
Ran python manage.py syncdb
Ran python manage.py shell to restart the interpreter
Re-imported mysite.polls.models import Poll, Choice
And re-ran Poll.objects.all()
And it worked! I got the string representation and not the object.
You might want to insert in your docs that syscdb needs to be re-run in order for the unicode() method to take effect.