Django Unit Tests Missing Database Columns

时光毁灭记忆、已成空白 提交于 2019-12-07 16:45:41

问题


I created a unit test on Django to create a user account and send a verification e-mail. The user is created, but the e-mail fails to send. The e-mail's default contents are supposed to be created as a field in the user when a user is created, but for some reason, Django is claiming -

DatabaseError: no such column: app_userprofile.default_email_header

It works fine when the account is created manually, though for some reason it fails to create that column in the database when done from a unit test. Any suggestions for fixing this?

Note: South was used to migrate changes in models.py - could that be the problem?

来源:https://stackoverflow.com/questions/11511209/django-unit-tests-missing-database-columns

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!