Opened 17 years ago
Closed 17 years ago
#7294 closed (invalid)
Same Classname and Fieldnames clash in edit inline
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
class Apple(models.Model): name = models.CharField() class Orange(models.Model): one = models.ForeignKey(One,edit_inline=models.STACKED) description = models.TextField()
This will break the admin when you try to save an Apple. The error message is very obscure and not understandable and doesn't guide you to the real conflict.
Note:
See TracTickets
for help on using tickets.
This fails long before trying to save an Apple. What you have included fails syncdb:
If I try to guess what you meant and change One to Apple then it still fails because you haven't included a max_length on the CharField plus there are no core=True fields in the inline-edited model. So since guessing isn't working out so well, please reopen with a copy of exactly what you have specified to cause the problem, preferably whittled down to as small an example as possible but not whittled so far that it doesn't work at all.