home / django_tickets / tickets

tickets: 259

This data as json

id created changetime last_pulled_from_trac stage status component type severity version resolution summary description owner reporter keywords easy has_patch needs_better_patch needs_tests needs_docs ui_ux
259 2005-08-03 21:17:02 2007-07-03 23:05:14 2022-03-06 03:20:13.660366 Accepted closed contrib.admin defect major   invalid Admin errors with edit_inline and foreign keys. The following model breaks the admin interface: {{{ #!python from django.core import meta # Create your models here. class Parent(meta.Model): fields = ( meta.CharField('title', maxlength=50), ) admin = meta.Admin() def __repr__(self): return self.title class Child(meta.Model): fields = ( meta.CharField('title', maxlength=50), ) admin = meta.Admin() def __repr__(self): return self.title class Relate(meta.Model): fields = ( meta.ForeignKey(Parent, edit_inline=True, edit_inline_type=meta.TABULAR), meta.ForeignKey(Child), ) def __repr__(self): return self.get_parent().title + " -> " + self.get_child().title }}} If there are no records in the 'relate' table, there appears to be no way to add them. If there are, then pressing 'save' in the parent admin view when one of the records shows a line of hyphens results in an error. adrian andrew@aylett.co.uk ManyToMany edit_inline 0 0 0 0 0 0
Powered by Datasette · Queries took 0.773ms