REG: get_display_name function in the User model

52 views
Skip to first unread message

Anoop Thomas Mathew

unread,
Apr 20, 2015, 11:39:39 PM4/20/15
to django-d...@googlegroups.com
Hi,

Would like to get the views from the community on get_display_name() function in User model. This will be an advanced version of get_full_name() function which returns either the Firstname Lastname if available or fall-back gracefully to email and then to username; implemented in the django.contrib.auth.model.User model.

regards,
Anoop Thomas Mathew
+91 999 53 44 675

Russell Keith-Magee

unread,
Apr 21, 2015, 12:19:30 AM4/21/15
to Django Developers
Hi Anoop,

I agree with Tim and Markus' comments - you're proposing to implement
a specific behavior where there is no "clearly right" answer. This
strikes me as something that is entirely site-dependent logic. You
don't even need a custom user model - a template tag (or even a
filter) could do this for you if it's a common enough case for you.

Yours,
Russ Magee %-)
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-develop...@googlegroups.com.
> To post to this group, send email to django-d...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAENdBjQcc5fWvRBggf-YyVUx5JdzK9Do9XmFNzB%3Dt8tC0srL_w%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

Anoop Thomas Mathew

unread,
Apr 21, 2015, 2:15:36 AM4/21/15
to django-d...@googlegroups.com
Point noted Russell.
Thank You for your comment.

On 21 April 2015 at 09:49, Russell Keith-Magee <rus...@keith-magee.com> wrote:

I agree with Tim and Markus' comments - you're proposing to implement
a specific behavior where there is no "clearly right" answer. This
strikes me as something that is entirely site-dependent logic. You
don't even need a custom user model - a template tag (or even a
filter) could do this for you if it's a common enough case for you.



Reply all
Reply to author
Forward
0 new messages