0
我有一個內聯的管理模型,帶有一個通用的外鍵,我想驗證它在模型clean()方法中的一組屬性。如果我添加一個新模型,那麼在clean()方法中都不會設置content_type和object_id,但是如果我嘗試更改現有模型的話,我可以訪問content_type屬性。django內聯管理模型和一般關係
當我第一次添加新模型時,是否有任何解決方法可以獲取content_type?
任何暗示或URL表示讚賞 感謝& &有一個愉快的一天! :)
巴斯蒂