On Thu, Aug 27, 2009 at 10:00 AM, Sven Richter<sver...@googlemail.com> wrote:
> I found this thread:
> http://stackoverflow.com/questions/660260/django-admin-form-for-many-to-many-relationship
> on Stackoverflow, but when i try the suggested TabularInline thing i get the
> error:
>
> <class 'politlog.eventchain.models.EventChain'> has no ForeignKey to <class
> 'politlog.entry.models.Entries'>
>

At least with Django 1.0.x, the admin interface does not support
many-to-many relationships on inlines -- it will always return an
error like the one you got above.  Indeed, the message is technically
accurate, because m2m relationships get implemented as a separate
table, so there is no direct relationship between the two.
InlineModelAdmin works great for one-to-many but not for many-to-many.

I'd also be interested in solutions to this, not having found anything
in a bunch of Google searches.  The alternative I'm planning on is
having to hand-code some views, forms, and templates that let me do
the right thing -- not a huge amount of work, but having admin do it
for us would be way cool.

Craig


> Greetings
> Sven

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to