Re: ManyToMany relationship on self through other table

2008-10-02 Thread chris
Dear Karen, Thank you very much for your response. It was very helpful and solved my problem! As I said, I am just beginning with Django, so could not quite understand where the problem lies. However, I will try to post a more useful and descriptive phrasing of the problem, including traceback

Re: ManyToMany relationship on self through other table

2008-10-01 Thread Karen Tracey
On Tue, Sep 30, 2008 at 4:52 AM, chris <[EMAIL PROTECTED]> wrote: > > Hi there, > > Just starting to use django, so forgive me if this has been answered > before (a quick search at djanog-search did not turn up something > useful). > What I am trying to do is similar to this (from > http://www.dja

Re: ManyToMany relationship on self through other table

2008-10-01 Thread felix
Exception Value: has more than 1 ForeignKey to hmm. I'm not sure. you might be able to get it to work by fudging something or other. but when it gets complicated like this, and it gets complicated for django's ORM, then I think its better to rearrange the approach. On Oct 1, 2:18 pm, chri

Re: ManyToMany relationship on self through other table

2008-10-01 Thread chris
Dear Felix, Thanks for following up on this. I put the traceback up here: http://paste.pocoo.org/show/86707/ I will try to follow your advice to work around the error and define the tables differently, since you are right about the way this should work in the admin interface. But I still thin

Re: ManyToMany relationship on self through other table

2008-09-30 Thread felix
post the traceback. I may not be able to help you since I haven't tried to do person-to-person at all. it might be simpler to just do Friends and Idols (without using through and without friends and idols being fields on Person) and then add methods to Person that fetch those relationships. or

Re: ManyToMany relationship on self through other table

2008-09-30 Thread chris
On Sep 30, 8:07 pm, felix <[EMAIL PROTECTED]> wrote: > are you actually getting a runtime error or an error when trying to > syncdb ? syncdb works fine, but then I get a runtime error when I want to edit such a record in the admin interface. The traceback complains about the two foreign keys

Re: ManyToMany relationship on self through other table

2008-09-30 Thread felix
are you actually getting a runtime error or an error when trying to syncdb ? On Sep 30, 10:52 am, chris <[EMAIL PROTECTED]> wrote: > Hi there, > > Just starting to use django, so forgive me if this has been answered > before (a quick search at djanog-search did not turn up something > useful). >

ManyToMany relationship on self through other table

2008-09-30 Thread chris
Hi there, Just starting to use django, so forgive me if this has been answered before (a quick search at djanog-search did not turn up something useful). What I am trying to do is similar to this (from http://www.djangoproject.com/documentation/models/m2m_recursive/): from django.db import model