It seems the model field takes precedence over the method on the
ModelAdmin, and I don't see "blah" returned in the changelist. This is
not clear from the documentation. (I figured I would be able to override
it).
On a related note, I think it makes sense to be able to override it in the
ModelAdmin.
--
Ticket URL: <https://code.djangoproject.com/ticket/21902>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_docs: => 0
* needs_better_patch: => 0
* needs_tests: => 0
* easy: 0 => 1
* stage: Unreviewed => Accepted
Comment:
Hi,
As described in the documentation [1], you can pass four different kinds
of values for `list_display`.
However, what that section doesn't say is that the given list is actually
the order in which Django tries each possibility.
I agree that it'd be useful to amend the documentation to mention
explicitly that the order of the list is the one Django uses.
As for the feature you're proposing, I don't see much value in it, for two
reasons:
1) It's already possible to override a field's display by defining a
method on the `ModelAdmin` you just need to give it a different name
2) Backwards-compatibility would be tricky
So I'm marking this ticket as `accepted` for the documentation issue
(which should be fairly trivial to fix), but I'm -0 on the proposed
change.
Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/21902#comment:1>
* type: Uncategorized => Cleanup/optimization
--
Ticket URL: <https://code.djangoproject.com/ticket/21902#comment:2>
* owner: nobody => kobuz
* status: new => assigned
* version: 1.5 => master
* cc: kobuz (added)
* keywords: admin => admin nlsprint14
--
Ticket URL: <https://code.djangoproject.com/ticket/21902#comment:3>
Comment (by kobuz):
PR for this https://github.com/django/django/pull/2347
--
Ticket URL: <https://code.djangoproject.com/ticket/21902#comment:4>
* cc: eromijn@… (added)
* has_patch: 0 => 1
* stage: Accepted => Ready for checkin
Comment:
Patch looks good to me :)
--
Ticket URL: <https://code.djangoproject.com/ticket/21902#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"09b725f51bbfa0f01b27ee2d718889926d409519"]:
{{{
#!CommitTicketReference repository=""
revision="09b725f51bbfa0f01b27ee2d718889926d409519"
Fixed #21902 -- Documented search order for list_display.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21902#comment:6>
Comment (by Baptiste Mispelon <bmispelon@…>):
In [changeset:"98070b94a9bbb8e915e724c4d23933bd3b243b3c"]:
{{{
#!CommitTicketReference repository=""
revision="98070b94a9bbb8e915e724c4d23933bd3b243b3c"
[1.6.x] Fixed #21902 -- Documented search order for list_display.
Backport of 09b725f51bbfa0f01b27ee2d718889926d409519 from master.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21902#comment:7>