Code

Opened 3 years ago

Closed 3 years ago

#16045 closed Uncategorized (duplicate)

Change history admin page not showing custom names for field in change history

Reported by: jacobwolf@… Owned by: nobody
Component: Uncategorized Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX:

Description

In the writing your first Django app tutorial part 2, once I update the date published field to today and now and view the change history, it states that I "changed pub_date" rather than "changed date published" even though the custom name is defined in my models.py file as shown below. Why is this and how do I change it?

from django.db import models
import datetime

class Poll(models.Model):

question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def unicode(self):

return self.question

def was_published_today(self):

return self.pub_date.date() == datetime.date.today()

class Choice(models.Model):

poll = models.ForeignKey(Poll)
choice = models.CharField(max_length=200)
votes = models.IntegerField()
def unicode(self):

return self.choice

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by ramiro

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

duplicate of #12952

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


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

 
Note: See TracTickets for help on using tickets.