﻿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
702	document that ManyToMany fields can't be in unique_together	hugo	nobody	"From IRC:

 * hugo- any way to get a unique_together that works with ManyToMany fields?
 * adrian_h I don't believe so, at the moment
 * hugo- yeah. I had it working with some simple validator, until I realized that my validator can't know wether I am creating or updating (and if updating, which one I am updating) :-)
 * hugo- I _think_ it could be done with the same check you do in manipulators_validator_unique_together in core.meta for ManyToOne
 * hugo- or at least a very similar one
 * adrian_h If a model has unique_together = (('slug', 'sites'),), where sites is a manytomany field, would the validator check that the slug is unique per each individual site, or per the specific combination of the sites?
 * hugo- per each site
 * hugo- at least that's how you use it in reverse: you use sites.get_current() to get the curent site and then for example check get_current().get_flatfile_object() to find the flatfile for that url for that site
 * hugo- currently you can add flatfiles for the same site with the same URL and get a nice exception ...
 * adrian_h Good point
 * adrian_h This is worth a ticket
"	New feature	closed	Documentation	dev	Normal	fixed	model-validation	django@… andre.miras+djangoproject@… dannyman@…	Accepted	1	0	0	0	0	0
