콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2156 화면

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
1500
0
9월 23
2104
7
5월 18
4331
3
4월 16
6754
1
7월 25
1298