﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
9475	add(), create(), etc. should be supported by intermediate ManyToMany model with extra attributes if extra fields can be calculated	omat@…	nobody	"Intermedite ManyToMany model with extra attributes should support add(), create(), etc. when the extra fields have default values or are calculated.

For example, for the following models:
{{{
class Person(models.Model):
    name = models.CharField(max_length=128)

class Group(models.Model):
    name = models.CharField(max_length=128)
    members = models.ManyToManyField(Person, through='Membership')

class Membership(models.Model):
    person = models.ForeignKey(Person)
    group = models.ForeignKey(Group)
    added = models.DateField(auto_now_add=True)
}}}

This should be possible:
{{{
Group.members.add(Person.objects.create(name='Joe'))
}}}

Similarly, if the attributes are calculated in the custom save() method or if they have a default value, those methods should be supported.

Maybe, simply removing the extra checks will do. So is it is the values are not sufficient, a db error will be raised anyway. "	New feature	closed	Database layer (models, ORM)	dev	Normal	fixed		robinchew@… someuniquename@… piethon@… naczelnik-djangoproject@… Collin Anderson astandley Rich Rauenzahn Zach	Accepted	1	0	0	0	0	0
