﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
10858	More useful output for User.__unicode__ allowing easy formatting of all admin forms that list users from settings	Paul McLanahan	Paul McLanahan	"When choosing a user in an admin form for a model with a relationship to the django.auth.models.User model, the field always shows the username attribute, which in many systems isn't very informative. This patch would allow control over the formatting of those fields from the settings module.

This introduces a new setting named ""AUTH_USER_STR_FORMATTER"", which should be set to a callable that will be passed the User model instance and is expected to return a string to be used as a plain text representation of the User object.

Example:

{{{
# settings.py

def user_str_formatter(user):
    fname = user.get_full_name()
    return ""%s (%s)"" % (fname, user.username) if fname else user.username

AUTH_USER_STR_FORMATTER = user_str_formatter
}}}"		closed	contrib.auth	dev		wontfix	auth user model unicode		Design decision needed	1	0	0	0	0	0
