跳至內容
選單
此問題已被標幟
1 回覆
2031 瀏覽次數

I would like to link to the contact record in my validation error. The message is 

f"Partners: {names} are not configured properly. (etc.)"

Where names is a list of contacts. I would like these names to link to their corresponding contact record. How can I make them links instead of strings?  


頭像
捨棄
最佳答案

Hi,

You can try as follows:

raise ValidationError(_("Invalid field %s.%s") % (model_name, field_name))


Thanks

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
10月 24
1375
0
9月 23
1998
7
5月 18
4239
3
4月 16
6649
1
7月 25
1149