Django_admin will report errors when try to save objects, where another object, which has a many_to_many field, is edit_inlined
Descriptions
- Django_admin will report errors when try to save objects, where another object, which has a many_to_many field, is edit_inlined
This is my model
Class A:
....
Class B:
field = ManyToManyField(ClassC);
a = ForeignKey(A, edit_inline=meta.STACKED)
Reproduce steps
- Then when I try to create a A object in django_admin, it will report errors as 'set_field' not exist..
django/db/models/manipulator.py
- line 217
for f in related.opts.many_to_many:
if child_follow.get(f.name, None) and not f.rel.edit_inline:
was_changed = getattr(new_rel_obj, 'set_%s' % f.name)(rel_new_data[f.attname])
if self.change and was_changed:
self.fields_changed.append('%s for %s "%s"' % (f.verbose_name, related.opts.verbose_name,
Change History
(4)
Component: |
Contrib apps → Metasystem
|
milestone: |
Version 0.93 → Version 1.0
|
Resolution: |
→ duplicate
|
Status: |
new → closed
|
0.93 has come and gone.