Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2039 Lượt xem

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?  


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

You can try as follows:

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


Thanks

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 10 24
1379
0
thg 9 23
2002
7
thg 5 18
4259
3
thg 4 16
6654
1
thg 7 25
1154