Opened 13 years ago

Closed 13 years ago

#11795 closed (fixed)

Allow use of inlines for many-to-many fields

Reported by: sveri Owned by: nobody
Component: Uncategorized Version: 1.1
Severity: Keywords: manytomanyfield inline
Cc: miracle2k, Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by Russell Keith-Magee)

When you try to create an inline field in for a manytomanyfield you always get the following error:
<class 'MyClass'> has no ForeignKey to <class 'OtherClass'>

It would be nice to be able to use inlines for many to many relations.

Change History (5)

comment:1 Changed 13 years ago by Russell Keith-Magee

Resolution: invalid
Status: newclosed

The documentation you reference refers to many-to-many models that use an intermediate table, not to m2m relations in general.

comment:2 Changed 13 years ago by sveri

Ok, thats true.
But is there a plan to support that for the future?
Should i open a feature request?

comment:3 Changed 13 years ago by Russell Keith-Magee

Description: modified (diff)
Resolution: invalid
Status: closedreopened
Summary: inline for many-to-many colmuns not workingAllow use of inlines for many-to-many fields

I'm not aware of any plans to add this feature. I've modified this ticket to reflect the feature request.

You may get your wish through a back channel. The changes required by #10109 will probably make this feature possible with no extra effort, as that ticket will require introducing a dummy model representation of m2m fields, and this dummy model may be compatible use in inlines. I plan to commit a fix for #10109 in the near future as a precursor to multiple-database and non-SQL backend support. I'll try to keep this ticket in mind before I commit.

comment:4 Changed 13 years ago by miracle2k

Cc: miracle2k added

comment:5 Changed 13 years ago by Russell Keith-Magee

Resolution: fixed
Status: reopenedclosed

(In [11712]) Fixed #11795 -- Document (and slightly simplify) the use of inlines for m2m relations.

This is the first immediate benefit of m2m relations having an autogenerated model.

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