Re: Many-to-many column admin interface

2009-08-31 Thread Thomas Guettler
Thank you for this link. Looks good Sven Richter schrieb: > Ah, and google does help or at least django_snippets. > I found the solution here: > http://www.djangosnippets.org/snippets/1295 > > The trick is to create a column in both models and in one with the option to > not syncdb. > Its

Re: Many-to-many column admin interface

2009-08-28 Thread Sven Richter
Yea, i thought about that, but for me this seems like an ugly workaround. Dont misunderstand me, i dont know enough about django and its database internals, but why should i use a third model for something i can access directly? The solution i posted above was exactly what i was looking for and

Re: Many-to-many column admin interface

2009-08-28 Thread Sven Richter
But i wonder how this would help me further. In the End it doesnt matter for me on which model i define the M2M relation. But i need to access the M2M Table from both models, at least in the view or in the template if not in the admin interface. I am having a hard time finding out how to achieve

Re: Many-to-many column admin interface

2009-08-28 Thread Sven Richter
Ah, and google does help or at least django_snippets. I found the solution here: http://www.djangosnippets.org/snippets/1295 The trick is to create a column in both models and in one with the option to not syncdb. Its really simple, just 6 lines at all. Greetings and a nice Weekend Sven On

Re: Many-to-many column admin interface

2009-08-28 Thread patrickk
I could be mistaken ... but why not using a third model. C(models.model): a = models.ForeignKey('A') b = models.ForeignKey('B') when editing either A or B, you could use C as inlines. regards, patrick On 28 Aug., 17:18, Sven Richter wrote: > But i wonder how

Re: Many-to-many column admin interface

2009-08-28 Thread Sven Richter
I've opened a bug/feature request at: http://code.djangoproject.com/ticket/11795#comment:2 if someone is interested. Greetings Sven On Fri, Aug 28, 2009 at 6:59 AM, Craig McClanahan wrote: > > On Thu, Aug 27, 2009 at 10:00 AM, Sven Richter > wrote: >

Re: Many-to-many column admin interface

2009-08-28 Thread Craig McClanahan
On Thu, Aug 27, 2009 at 10:00 AM, Sven Richter 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: > > has no

Re: Many-to-many column admin interface

2009-08-27 Thread Sven Richter
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: has no ForeignKey to Greetings Sven On Thu, Aug 27, 2009 at 5:03 PM, Thomas Guettler

Re: Many-to-many column admin interface

2009-08-27 Thread Thomas Guettler
Hi, I had the same question some time ago and found no answer, but maybe you try harder. Sven Richter schrieb: > Hi, > > i have a new problem with my many-to-many field. > > I have two models A and B. > A(models.model): > b = models.ManyToManyField('app.B') > > Now when i edit A in the

Many-to-many column admin interface

2009-08-27 Thread Sven Richter
Hi, i have a new problem with my many-to-many field. I have two models A and B. A(models.model): b = models.ManyToManyField('app.B') Now when i edit A in the admin interface everything is ok, i can select all B instances A belongs to. What i need now is to be able to do the same thing from