Include app label in admin validation messages
|Reported by:||Chris Lamb||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)
comment:1 Changed 6 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|
comment:5 Changed 5 years ago by
|Owner:||changed from nobody to anonymous|
|Status:||new → assigned|