Opened 10 years ago
Closed 10 years ago
#24640 closed New feature (wontfix)
Add AbstractUser.get_display_name()
Reported by: | Anoop Thomas Mathew | Owned by: | nobody |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Most of the time, get_full_name() returns only first name and last name, and many a times, if first name and last name is not present, we need at least the email or the username to be returned to the template. get_display_name() returns the email if there is no get_full_name(); and if no email, then fallback to username. I find get_display_name more pragmatic than the proposed get_full_name, when it comes to showing user details in templates.
Change History (3)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Easy pickings: | unset |
---|---|
Summary: | custom function for display name → Add AbstractUser.get_display_name() |
comment:3 by , 10 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I agree with Tim. In all projects I run, the requirements differ on what the "display name" should be. Some projects even have an explicit "display name" attribute for the user to fill.
Feel free to bring this topic up on the django-developers mailing list, but for now I'm closing this issue as wontfix.
Adding my thought from the pull request: "If Django doesn't use the method, I tend to think it's better suited to leave it to custom user models."