1👍
syncdb
will not create or modify columns if they already exist in the database. If you already had the model and then you added the gender column, running syncdb
will not do anything.
You need to drop the table and re-create it again. If you are using sqlite, simply delete the database file and run syncdb.
If you are using another database, run manage.py sqlclear yourapp
and this will give you the SQL you need to execute to reset the tables for the app yourapp
(make sure you replace yourapp with the name of the application that has the profile model).
Then, run syncdb again to recreate your models.
0👍
Have you done a python manage.py syncdb
after you made any changes to your model? This error usually happens when the model and the database are out of sync.
- [Answer]-Quotes inside quotes inside quotes
- [Answer]-How to filter between two databases?
- [Answer]-Python 2.7- django 1.7 (virtualenv) AppRegistryNotReady: Models aren't loaded yet error
- [Answer]-Django (1.6) Login status success or not?
- [Answer]-Creating tree editor for mptt model in django admin