#12952: Models history doesn't use verbose names --------------------------------------+------------------------------------ Reporter: acangiano | Owner: nobody Type: Cleanup/optimization | Status: new Component: contrib.admin | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 1 Easy pickings: 0 | UI/UX: 1 --------------------------------------+------------------------------------
Comment (by RamezIssac): I think it's better to work with the form labels then model's verbose name, I think It's actually a more natural flow and more consistent if the label is different then the verbose name. My Approach would be to gather the changed fields' labels, then send it to get_text_list https://github.com/django/django/blob/master/django/contrib/admin/options.py#L925-L936 {{{ translated_changed_fields = [form.fields[f].label for f in form.changed_data] change_message.append(_('Changed %s.') % get_text_list(translated_changed_fields, _('and'))) #again for formset for changed_object, changed_fields in formset.changed_objects: translated_changed_fields = [formset.fields[f].label for f in changed_fields] change_message.append(_('Changed %(list)s for %(name)s "%(object)s".') % {'list': get_text_list(translated_changed_fields, _('and')), #... }}} Created a duplicate [https://code.djangoproject.com/ticket/24990 24990] Regards; -- Ticket URL: <https://code.djangoproject.com/ticket/12952#comment:15> Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.795772126995291910d3de86aa6e001c%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.