Opened 4 years ago

Last modified 5 weeks ago

#12952 new Bug

Models history doesn't use verbose names

Reported by: acangiano Owned by: nobody
Component: contrib.admin Version: 1.2-beta
Severity: Normal Keywords:
Cc: vvangelovski@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: yes


The history for a model object (within the admin section) should show human-readable messages, favoring verbose names over field names. However, this is not currently the case. For example, consider a model with the following class variable:

pub_date = models.DateTimeField("date published")

Changing the publication date for an object of that model, will display "Changed pub_date." in its admin history, rather than "Change date published." as one would expect (as older versions of Django did).

Attachments (2)

django-admin-history-verbose-name.diff (1.8 KB) - added by Alex 4 years ago.
Initial patch, probably needs tests.
admin_history.diff (4.0 KB) - added by vasiliyeah 3 years ago.

Download all attachments as: .zip

Change History (13)

Changed 4 years ago by Alex

Initial patch, probably needs tests.

comment:1 Changed 4 years ago by russellm

  • Has patch set
  • milestone 1.2 deleted
  • Needs documentation unset
  • Needs tests set
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 3 years ago by lukeplant

  • Type set to Bug

comment:3 Changed 3 years ago by lukeplant

  • Severity set to Normal

comment:4 Changed 3 years ago by vasiliyeah

  • Easy pickings unset
  • Patch needs improvement set
  • UI/UX unset

This patch can't be applied.

Version 0, edited 3 years ago by vasiliyeah (next)

comment:5 Changed 3 years ago by vasiliyeah

  • Patch needs improvement unset
  • UI/UX set

comment:6 Changed 3 years ago by vasiliyeah

  • Cc vvangelovski@… added

Changed 3 years ago by vasiliyeah

comment:7 Changed 3 years ago by vasiliyeah

  • Needs tests unset

Updated patch to apply to current trunk and added a test for the history view.

comment:8 Changed 3 years ago by julien

  • Triage Stage changed from Accepted to Design decision needed

Marking as DDN until an answer to ticket:14358#comment:3 is provided.

comment:9 Changed 3 years ago by aaugustin

  • Triage Stage changed from Design decision needed to Accepted

The objection was "for debug purposes, it would be more useful to have the field names, as they are necessarily unique, untranslated, etc."

In my opinion:

  • uniqueness is a weak argument: if you have two fields with the same name, you're just asking for trouble;
  • translation isn't an issue at all: in doubt, just switch the website to the default language of your codebase.

comment:10 Changed 3 years ago by aaugustin

#14358 is a duplicate and has patches too.

comment:11 Changed 5 weeks ago by timo

  • Patch needs improvement set

Patch will need to be updated to apply cleanly.

Add Comment

Modify Ticket

Change Properties
<Author field>
as new
The owner will be changed from nobody to anonymous. Next status will be 'assigned'
as The resolution will be set. Next status will be 'closed'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.