On Jul 10, 4:40 pm, Rolando Espinoza La Fuente <[email protected]> wrote: > On Sat, Jul 10, 2010 at 9:31 AM, Derek <[email protected]> wrote: > > Running Django 1.2.1 under Python 2.6. > > I am obviously missing something cruccial, but I am just not sure where this > > is... > > I have a setup which includes a number of many-to-many models in a legacy > > database. For example: > > > class Grouping(models.Model): > > id = models.AutoField(primary_key=True, db_column='GroupingID') > > name = models.CharField(max_length=250, db_column='GroupingName', > > unique=True) > > class TaxAgreement(models.Model): > > id = models.AutoField(primary_key=True, db_column='TaxID') > > title = models.CharField(max_length=100, db_column='TaxTitle', > > unique=True) > > groupings = models.ManyToManyField(Grouping, > > db_table='taxagreementgrouping') > > Use through > keywordhttp://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.mod... > > groupings = models.ManyToManyField(Grouping, through='TaxAgreementGrouping') >
Thanks, this fixes those problems. Unfortunately, however, it also introduces a new error. When I try and start the app, I now get: ImproperlyConfigured at /admin/ 'TaxAgreementAdmin.fieldsets[6][1]['fields']' can't include the ManyToManyField field 'groupings' because 'groupings' manually specifies a 'through' model. I need to be able to use the "many to many" box in order to create the associations... Thanks Derek -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

