Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#9775 closed (fixed)

admin multi-table inheritance broken since rev 9602

Reported by: chr Owned by: mtredinnick
Component: contrib.admin Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

hi there,

this has driven me mad for some hours but think i've tracked down the culprit... i've made a lot of changes to my code, and updated the django svn... bad mistake.

anyway, here's my model(s):

class PublishableItem(models.Model):
    title = models.CharField(max_length=200)

class EventItem(PublishableItem):
    location = models.TextField(blank=True)

class Concert(EventItem):
    band = models.CharField(max_length=200)

class Meeting(EventItem):
    topic = models.CharField(max_length=200)

now, in change_list.html the admin will throw this:

Caught an exception while rendering: Concert has no field named 'publishableitem_ptr_id'

when updating to rev 9601 the error disappears, and changeset #9602 actually changed some things in this department. not sure how the next few changesets might interfere with this.

Change History (4)

comment:1 Changed 7 years ago by chr

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

oops, forgot about the abstract=True in EventItem

comment:2 Changed 7 years ago by mtredinnick

  • Owner changed from nobody to mtredinnick
  • Status changed from new to assigned

comment:3 Changed 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [9618]) Fixed #9775 -- Fixed an oversight from r9601 and allow direct attribute
lookup in the serializable_value() method. This means that abstract
parents that are multi-table children of other models(no, really!!) now
work again.

comment:4 Changed 7 years ago by mtredinnick

(In [9619]) [1.0.X] Fixed #9775 -- Fixed an oversight from r9601 and allow direct attribute
lookup in the serializable_value() method. This means that abstract
parents that are multi-table children of other models(no, really!!) now
work again.

Backport of r9618 from trunk.

Note: See TracTickets for help on using tickets.
Back to Top