#4620: Custom labels for choices in ModelChoiceField
----------------------------------------------+-----------------------------
Reporter: Bill Fenner <[EMAIL PROTECTED]> | Owner: nobody
Status: reopened | Component:
django.newforms
Version: 0.96 | Resolution:
Keywords: | Stage: Design
decision needed
Has_patch: 1 | Needs_docs: 1
Needs_tests: 1 | Needs_better_patch: 0
----------------------------------------------+-----------------------------
Changes (by moya):
* status: closed => reopened
* resolution: wontfix =>
Comment:
Replying to [comment:6 jacob]:
> Yes, we're sure this is wontfix.
Could you please give a short rationale on this given that having custom
labels [comment:ticket:4620:5 is not trivial] as you did think before. The
solution, as SmileyChris explained, involves some code duplication (maybe
more code duplicated than the actual bits used for getting the custom
label itself)
I have a class {{{Foo}}} that have a {{{user = ForeignKey(User)}}} and
would like to choose users for {{{Foo}}} instances by their full name
instead of by their username. {{{User}}} here is the standard class from
{{{django.contrib.auth}}} and so it's outside my control.
The needing of displaying full names instead of usernames in a
{{{ModelChoiceField}}} for {{{django.contrib.auth.models.User}}} doesn't
seem so uncommon to me.
--
Ticket URL: <http://code.djangoproject.com/ticket/4620#comment:8>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---