Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#2209 closed enhancement (duplicate)

Edit inline and models without fields in the admin

Reported by: anonymous Owned by: adrian
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: UI/UX:


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 9 years ago by tyson@…

See also #1972

comment:2 Changed 9 years ago by ubernostrum

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 9 years ago by ubernostrum

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 9 years ago by ubernostrum

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #1972

comment:5 Changed 9 years ago by anonymous

  • Component changed from Admin interface to Cache system
  • milestone set to Version 0.92
  • priority changed from normal to highest
  • Severity changed from normal to blocker
  • Type changed from defect to enhancement
  • Version set to SVN

comment:6 Changed 9 years ago by adrian

  • milestone Version 0.92 deleted

Milestone Version 0.92 deleted

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