我改變了我以前的用戶模型,以便它現在繼承了django的用戶模型。django完整性錯誤,我知道爲什麼,但不知道如何解決
from django.contrib.auth.models import User
class UserProfile(User):
#fields..
但其他車型都指着我的前模特,現在如果我要遷移,我得到的錯誤:
(user_id)=(9) does not exist in auth_user table.
合理的錯誤消息。但我現在應該做什麼?我真的被卡住了。我使用的Django 1.4版
我做出了錯誤的截圖:
謝謝Paul,很有幫助。我認爲,繼承和放置外鍵是一回事。我正在使用django1.4 – doniyor