تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2064 أدوات العرض

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
أكتوبر 24
1427
0
سبتمبر 23
2015
7
مايو 18
4279
3
أبريل 16
6685
1
يوليو 25
1195