Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
Use verbose_name instead of object_name in error messages#4299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
sassanh commentedJul 24, 2016
Related to#4300. |
lovelydinosaur commentedJul 26, 2016
Yup this looks good, thanks! |
sassanh commentedJul 26, 2016
I'll upgrade the test, could you please review my 2 commits and tell me which one is the right one? |
codecov-io commentedJul 26, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Current coverage is 91.19% (diff: 100%)@@ master #4299 diff @@========================================== Files 52 52 Lines 5776 5781 +5 Methods 0 0 Messages 0 0 Branches 0 0 ==========================================+ Hits 5267 5272 +5 Misses 509 509 Partials 0 0
|
lovelydinosaur commentedJul 26, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Sorry, could you be more explicit? |
| return'%(model_name)s-detail'% { | ||
| 'app_label':model._meta.app_label, | ||
| 'model_name':model._meta.verbose_name.lower() | ||
| 'model_name':model._meta.object_name.lower() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@tomchristie is it correct the way it is or should I convert thisobject_name toverbose_name too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This should remain asobject_name, as you currently have it.
lovelydinosaur commentedJul 26, 2016
Closes#4300. |
Note: Before submitting this pull request, please review ourcontributing guidelines.
Description
It should use
verbose_name, notobject_name, took me 2 hours to find out why parts of error were not translated as I didn't expect it to happen in drf.