[Django] #21781: If name is not set, get_full_name should return username

6 views
Skip to first unread message

Django

unread,
Jan 14, 2014, 2:22:28 PM1/14/14
to django-...@googlegroups.com
#21781: If name is not set, get_full_name should return username
--------------------------------+--------------------
Reporter: matej.ramuta@… | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------
get_full_name method from django.contrib.auth models.py returns a combined
first_name and last_name (with a space in between). But if first_name and
last_name are not set, this method should return a username.

--
Ticket URL: <https://code.djangoproject.com/ticket/21781>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 15, 2014, 9:54:47 AM1/15/14
to django-...@googlegroups.com
#21781: If name is not set, get_full_name should return username
--------------------------------+--------------------------------------

Reporter: matej.ramuta@… | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: 1.6
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by timo):

* needs_better_patch: => 0
* has_patch: 0 => 1
* needs_tests: => 0
* needs_docs: => 0


Comment:

I'm -0 on this change given backwards compatibility concerns. We have the
custom user model to let users make changes like this if they need it.

PR from the reporter is here: https://github.com/django/django/pull/2167

--
Ticket URL: <https://code.djangoproject.com/ticket/21781#comment:1>

Django

unread,
Jan 15, 2014, 7:24:14 PM1/15/14
to django-...@googlegroups.com
#21781: If name is not set, get_full_name should return username
--------------------------------+--------------------------------------
Reporter: matej.ramuta@… | Owner: nobody
Type: New feature | Status: closed
Component: contrib.auth | Version: 1.6
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by russellm):

* status: new => closed
* resolution: => wontfix


Comment:

I agree with @timo. Returning username as a substitute is a business logic
decision about the visualisation. Returning username presumes that it is a
good substitute, which won't necessarily be a true. You might want to
display "Hi, Stranger" if the user doesn't have a username; the current
implementation allows this to be fixed at the template layer. And, if you
*do* want the username as a default, you can implement this in the
template layer as well.

Thanks for the suggestion, but marking wontfix.

--
Ticket URL: <https://code.djangoproject.com/ticket/21781#comment:2>

Django

unread,
Jan 16, 2014, 4:26:43 AM1/16/14
to django-...@googlegroups.com
#21781: If name is not set, get_full_name should return username
--------------------------------+--------------------------------------
Reporter: matej.ramuta@… | Owner: nobody
Type: New feature | Status: closed
Component: contrib.auth | Version: 1.6
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------

Comment (by matej.ramuta@…):

Ok, thanks for your feedback.

--
Ticket URL: <https://code.djangoproject.com/ticket/21781#comment:3>

Reply all
Reply to author
Forward
0 new messages