![](/img/trans.png)
[英]I get thrown a AttributeError: 'Particle' object has no attribute 'MomentumSum' , if someone could help that would be great, thanks
[英]I get this Error AttributeError at /listings/5689-resot-relly-market, 'Profile' object has no attribute 'favourite' please any help would be apprciate
我正在 django 中添加最喜歡的 function,當我點擊保存按鈕時,我一直收到此錯誤。 從這里看起來一切都很好,為什么我不能真正告訴錯誤來自哪里
模型.py
class Profile(models.Model):
user = models.OneToOneField(User, related_name='profile', on_delete=models.CASCADE)
...
favorite = models.ManyToManyField(Accomodation, related_name='profile')
我拼錯了最喜歡的所以我改變了這一行
favorite = models.ManyToManyField(Accomodation, related_name='profile')
至
favourite = models.ManyToManyField(Accomodation, related_name='profile')
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.