Include app label in admin validation messages
|Reported by:||lamby||Owned by:||gandalfar|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
It is possible to have duplicate model names across your project (which is a good thing). However, it currently results in some ambiguous error messages when validating admin classes.
'MembershipAdmin.raw_id_fields' refers to field 'user_id' that is missing from model 'Membership'.
... does that refer to my Membership class in my "foo" app or my "bar" app?
The attached patch includes the app label in the error messages. For example:
'MembershipAdmin.raw_id_fields' refers to field 'user_id' that is missing from model 'bar.Membership'.
Change History (12)
Changed 5 years ago by lamby
comment:1 Changed 5 years ago by julien
- Needs documentation unset
- Needs tests set
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:5 Changed 5 years ago by Jure Cuhalev <gandalf@…>
- Easy pickings unset
- Owner changed from nobody to anonymous
- Status changed from new to assigned
comment:6 Changed 5 years ago by Jure Cuhalev <gandalf@…>
- Owner changed from anonymous to gandalfar
- Status changed from assigned to new
Changed 5 years ago by Jure Cuhalev <gandalf@…>
comment:7 Changed 5 years ago by klette
- Needs tests unset
- Triage Stage changed from Accepted to Ready for checkin