Re: ManyToManyField in both models/forms

2009-01-24 Thread Evgeniy Ivanov
Oops, sorry. I meant form's meta. Something like this: class GroupForm(ModelForm): class Meta: model = Group m2m_model = User Looks like more logical thing, than I suggested at the beginning. On Jan 24, 6:53 am, Malcolm Tredinnick wrote: > On Fri, 2009-01-23 at 00:12 -0800,

Re: ManyToManyField in both models/forms

2009-01-23 Thread Malcolm Tredinnick
On Fri, 2009-01-23 at 00:12 -0800, Evgeniy Ivanov wrote: > On Jan 23, 3:17 am, Malcolm Tredinnick > wrote: > > Addressing this only in the admin would be short-sighted, however. A for > > field that new how to handle reverse relations would be the first step > > and then allowing the admin to use

Re: ManyToManyField in both models/forms

2009-01-23 Thread Evgeniy Ivanov
On Jan 23, 3:17 am, Malcolm Tredinnick wrote: > Addressing this only in the admin would be short-sighted, however. A for > field that new how to handle reverse relations would be the first step > and then allowing the admin to use that is the second one. > Maybe better approuch is in model's met

Re: ManyToManyField in both models/forms

2009-01-22 Thread Yuri Baburov
Hi Malcolm, > I look forward to reading your patch. :-) OK. -- Best regards, Yuri V. Baburov, ICQ# 99934676, Skype: yuri.baburov, MSN: bu...@live.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django develop

Re: ManyToManyField in both models/forms

2009-01-22 Thread Malcolm Tredinnick
On Thu, 2009-01-22 at 21:51 +0600, Yuri Baburov wrote: > Hi, and what's wrong with writing a fix for admin to make "inverted" > m2m relation to show m2m if specified in list_display list? I know > it's not easy to do for one who is not django creator, but since it's > open source... ;) > > Core d

Re: ManyToManyField in both models/forms

2009-01-22 Thread Yuri Baburov
On Fri, Jan 23, 2009 at 3:58 AM, Evgeniy Ivanov wrote: > > On Jan 22, 6:51 pm, Yuri Baburov wrote: >> Hi, and what's wrong with writing a fix for admin to make "inverted" >> m2m relation to show m2m if specified in list_display list? I know >> it's not easy to do for one who is not django creato

Re: ManyToManyField in both models/forms

2009-01-22 Thread Evgeniy Ivanov
On Jan 22, 6:51 pm, Yuri Baburov wrote: > Hi, and what's wrong with writing a fix for admin to make "inverted" > m2m relation to show m2m if specified in list_display list? I know > it's not easy to do for one who is not django creator, but since it's > open source... ;) Oh, it could be interest

Re: ManyToManyField in both models/forms

2009-01-22 Thread Yuri Baburov
Hi, and what's wrong with writing a fix for admin to make "inverted" m2m relation to show m2m if specified in list_display list? I know it's not easy to do for one who is not django creator, but since it's open source... ;) Core devs, what's your opinion? Such change is pretty logical, short and

Re: ManyToManyField in both models/forms

2009-01-22 Thread Evgeniy Ivanov (powerfox)
Reread what I've written and understand it would be much better with a sample: class User(models.Model): groups = models.ManyToManyField('Group', related_name='groups', db_table=u'USERS_TO_GROUPS') class Group(models.Model): users = models.ManyToManyField(User, related_name='users', db_ta

ManyToManyField in both models/forms

2009-01-21 Thread Evgeniy Ivanov (powerfox)
Hi list, I had to implement M2M editing in both admin forms (something like editing userlist for group and grouplist for user). I wasn't able to find any fine solution, but specifying M2M in both models and creating tables manually (since syncdb tries to create two tables). I herd in the IRC, that