Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#2209 closed enhancement (duplicate)

Edit inline and models without fields in the admin

Reported by: anonymous Owned by: Adrian Holovaty
Component: Core (Cache system) Version: master
Severity: blocker Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


If a model is a ForeignFey for another model with edit_inline=models.STACKED or TABULAR but have no fields itself the admin fails to display the the page at all. Failing with a error page.

class Cart(models.Model):

    class Admin:

class CartItem(models.Model):

    cart =  models.ForeignKey(Cart, edit_inline=models.STACKED)
    quantity = models.PositiveIntegerField(core=True)

Change History (6)

comment:1 Changed 13 years ago by tyson@…

See also #1972

comment:2 Changed 13 years ago by James Bennett

I guess with both of these tickets (this one and the one referenced in the above comment) I wonder what the perceived utility is of relating to an object which has no columns in the database other than a primary key; what actual problem does such a setup solve?

comment:3 Changed 13 years ago by James Bennett

Also, it looks like the common problem is that when a model has no fields, syncdb doesn't bother creating a table for it (using the model definitions above, no tables were created when running syncdb on the app). Which makes logical sense, but we could probably document that better.

comment:4 Changed 13 years ago by James Bennett

Resolution: duplicate
Status: newclosed

Duplicate of #1972

comment:5 Changed 13 years ago by anonymous

Component: Admin interfaceCache system
milestone: Version 0.92
priority: normalhighest
Severity: normalblocker
Type: defectenhancement
Version: SVN

comment:6 Changed 12 years ago by Adrian Holovaty

milestone: Version 0.92

Milestone Version 0.92 deleted

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