Re: Dynamic verbose_name_plural to display number of models in admin panes

2011-06-05 Thread Alexey Moskvin
Tim, thanks for your help! Also, I've found another solution for this problem: http://stackoverflow.com/questions/6241906/display-number-of-instances-for-each-model-in-djangos-admin-index On 5 июн, 16:50, Tim Shaffer wrote: > You could probably do it using a signal. Every time a record is created

Re: Dynamic verbose_name_plural to display number of models in admin panes

2011-06-05 Thread Tim Shaffer
You could probably do it using a signal. Every time a record is created or deleted, you can update the verbose_name_plural with the current count. from django.db.models.signals import post_save, post_delete def update_verbose_name(sender, **kwargs): Elephant._meta.verbose_name_plural = 'elep