Bi-directional ManyToMany usage with ModelForm

2018-05-09 Thread Bernhard Miller
Hello, I'm currently implementing a django-based project that features users and user groups. The two are connected by a ManyToMany relationship. Using the generic django helpers (ModelForm, UpdateView, CreateView, ...) I would like to be able to edit this many to many connection from both en

Re: Bi-directional ManyToMany with through gets broken when creating test database

2015-12-04 Thread filias
1] https://docs.djangoproject.com/en/1.8/releases/1.8/#model-meta-api > [2] > https://docs.djangoproject.com/en/1.8/ref/models/fields/#django.db.models.ManyToManyField.related_name > > Le vendredi 4 décembre 2015 07:08:51 UTC-5, filias a écrit : >> >> Indeed something in the proje

Re: Bi-directional ManyToMany with through gets broken when creating test database

2015-12-04 Thread Simon Charette
.djangoproject.com/en/1.8/ref/models/fields/#django.db.models.ManyToManyField.related_name Le vendredi 4 décembre 2015 07:08:51 UTC-5, filias a écrit : > > Indeed something in the project's code must be wrong but it is not the > bi-directional ManyToMany as this has been working in django 1.4, 1.5, 1.6 > and 1.7. One m

Re: Bi-directional ManyToMany with through gets broken when creating test database

2015-12-04 Thread filias
Indeed something in the project's code must be wrong but it is not the bi-directional ManyToMany as this has been working in django 1.4, 1.5, 1.6 and 1.7. One might want to had the ManyToMany in both models so to be able to add more information, as it is stated in the django docs

Re: Bi-directional ManyToMany with through gets broken when creating test database

2015-12-04 Thread Remco Gerlich
lias wrote: > Hi, > > I have recently upgraded to sjango 1.8 and I have 2 models with a > bi-directional ManyToMany field. It looks like this > > class Pizza(Model): > available_toppings = ManyToManyField('Topping') > > class Topp

Bi-directional ManyToMany with through gets broken when creating test database

2015-12-04 Thread filias
Hi, I have recently upgraded to sjango 1.8 and I have 2 models with a bi-directional ManyToMany field. It looks like this class Pizza(Model): available_toppings = ManyToManyField('Topping') class Topping(Model): all_pizzas = ManyToManyField(Pizza

Re: Bi-Directional ManyToMany

2005-11-23 Thread plisk
Its not that needs to be done asap, i'll wait until new-admin merges and then give it a try.

Re: Bi-Directional ManyToMany

2005-11-23 Thread Robert Wittams
plisk wrote: > Anyone working on this ? Would be great to have such functionality, so > if noone started to do it i could give a look. Also where will this > bidirectional ManyToMany select appear in itemtypes, below all the > controls it has in model ? > > I am working on core-fields removal a

Re: Bi-Directional ManyToMany

2005-11-23 Thread plisk
Anyone working on this ? Would be great to have such functionality, so if noone started to do it i could give a look. Also where will this bidirectional ManyToMany select appear in itemtypes, below all the controls it has in model ?

Re: Bi-Directional ManyToMany

2005-11-18 Thread Robert Wittams
[EMAIL PROTECTED] wrote: > Hi > > I've just defined a manytomany relationship in the following way > > class ItemType(meta.Model): > name = meta.CharField(maxlength=100) > descritpion = meta.CharField(maxlength=250) > > class PropertyType(meta.Model): > name = meta.CharField(maxleng

Re: Bi-Directional ManyToMany

2005-11-18 Thread [EMAIL PROTECTED]
Perhaps I should have stated I'm using the new-admin branch

Bi-Directional ManyToMany

2005-11-18 Thread [EMAIL PROTECTED]
Hi I've just defined a manytomany relationship in the following way class ItemType(meta.Model): name = meta.CharField(maxlength=100) descritpion = meta.CharField(maxlength=250) class PropertyType(meta.Model): name = meta.CharField(maxlength=100) itemtypes = meta.ManyToManyField(