--
Ticket URL: <https://code.djangoproject.com/ticket/18388>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* easy: 0 => 1
* needs_docs: => 0
* stage: Unreviewed => Accepted
Comment:
This is in tone with #17646, #17006 and #16841.
I'm accepting this based on that they are similar to the other ones,
adding hooks to the ModelAdmin.
Maybe we can think a way to add this "hooks" in a more DRY way than adding
a function get_FOO(self, request): return self.FOO
--
Ticket URL: <https://code.djangoproject.com/ticket/18388#comment:1>
Comment (by anonymous):
I think 'GET' is the easiest way to personalize this, and also believe
that all variables should have a 'GET'
--
Ticket URL: <https://code.djangoproject.com/ticket/18388#comment:2>
* owner: nobody => anonymous
--
Ticket URL: <https://code.djangoproject.com/ticket/18388#comment:3>
* owner: anonymous => vanessagomes
--
Ticket URL: <https://code.djangoproject.com/ticket/18388#comment:4>
* owner: vanessagomes => nobody
--
Ticket URL: <https://code.djangoproject.com/ticket/18388#comment:5>
* owner: nobody => Melevir
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/18388#comment:6>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/18388#comment:7>
* has_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/18388#comment:8>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/18388#comment:9>
Comment (by javimansilla):
#19425 is proposing something similar and IMHO it's doing it on a better
way
--
Ticket URL: <https://code.djangoproject.com/ticket/18388#comment:10>
Comment (by areski):
I agree also that #19425 is more elegant, I rebased the patch from that
ticket and added max_num as per the suggestion here.
See patch in attachment and the PR :
https://github.com/django/django/pull/1155
--
Ticket URL: <https://code.djangoproject.com/ticket/18388#comment:11>
* cc: areski@… (added)
Comment:
Just updated the patch to add some documentation
--
Ticket URL: <https://code.djangoproject.com/ticket/18388#comment:12>
* owner: Melevir => timo
Comment:
`InlineModelAdmin.get_extra` was added in #19425. I'll try to review and
commit the second half of this.
--
Ticket URL: <https://code.djangoproject.com/ticket/18388#comment:13>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"61524b09cfa3b51643d0e79cbf0e1e08ede357ae"]:
{{{
#!CommitTicketReference repository=""
revision="61524b09cfa3b51643d0e79cbf0e1e08ede357ae"
Fixed #18388 - Added InlineModelAdmin.get_max_num hook.
Thanks d.willy.c.c@ for the suggestion and Melevir and Areski Belaid for
work
on the patch.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/18388#comment:14>